You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Adam,
a feature that could be easily integrated and would greatly enhance Unicorn is a client side "remove component" action.
In many cases unicorn components are list elements or table rows that include action buttons like "Delete". You have examples for that using parent components that remove that row and rerender the whole list. This unnecessarily over-complicates the situation, as in IMHO many cases no parent component is needed - just a <ul> or <table> element.
What e.g. the Tetra framework does, is to provide a self.client._remove_component() method, that just removes the whole element from the DOM at the client side.
So a simple component delete action would just be:
Adding client side Js functions that can be called from the backend would be generally a huge benefit. (already there)
But the delete() action is the most important.
The text was updated successfully, but these errors were encountered:
0.58.0 of Unicorn adds a Unicorn.deleteComponent method to remove a component from internal component store. I could extend this to remove the actual DOM element as well if that would be useful.
Hi Adam,
a feature that could be easily integrated and would greatly enhance Unicorn is a client side "remove component" action.
In many cases unicorn components are list elements or table rows that include action buttons like "Delete". You have examples for that using parent components that remove that row and rerender the whole list. This unnecessarily over-complicates the situation, as in IMHO many cases no parent component is needed - just a
<ul>
or<table>
element.What e.g. the Tetra framework does, is to provide a
self.client._remove_component()
method, that just removes the whole element from the DOM at the client side.So a simple component delete action would just be:
and the template:
Adding client side Js functions that can be called from the backend would be generally a huge benefit.(already there)But the
delete()
action is the most important.The text was updated successfully, but these errors were encountered: