Closed olegantonyan closed 8 years ago
With Inesita, you're playing with virtual-dom, don't afraid to remove item and rerender whole screen. You should not use after_render
and all this jquery like stuff.
Store
should keep your application state. Render methods should depend on state, and all actions should change state and call render!
.
You should read about flux application architecture.
Ok, thanks! Sorry for the stupid questions
Probably a bug in opal/opal-browser I have a button which should be hidden in same cases:
It works, but along with right id (
button-add-selected
) other elements also gets hidden.My playground repository https://bitbucket.org/antlabs_dev/rmpd_server_frontend open playlists in navbar and check left list of the items. This is
MediaItems::Index
component.What I see is that first element in a list always disappear, sometimes first and second. If you inspect the page with inspector you'll find that for these elements visibility is hidden. If you remove
$document['button-add-selected'].style.visibility = selected_items.empty? ? 'hidden' : ''
than it works as expectedgives same result