ember-drag-sort
ember-drag-sort copied to clipboard
Dynamic childClass
Hi! Is there a way to evaluate childClass dynamically for each item?
I want to color list' items depending on their state.
Also I use it in table, so childTagName is tr and I can't specify its style inside block
Currently the addon does not support passing childClass on a per-item basis.
What kind of state do you want to indicate? There's already quite a number of HTML classes applied, reflecting all states of the draggable stuff.
@lolmaus I'd indicate business logic' state, not related to its "draggability".
Can you do it on a child element?
A graceful solution would require exposing the child element. This is a right thing to do but it takes a larger refactoring and a breaking change.
I'm pretty new in frontend, so it's hard to invent something mostly because of restrictions made by surrounding table tag)
But I'll find a solution one way or another ¯_(ツ)_/¯
Please show your template code.