ember-drag-sort icon indicating copy to clipboard operation
ember-drag-sort copied to clipboard

Dynamic childClass

Open dem1tris opened this issue 5 years ago • 5 comments

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

dem1tris avatar Oct 15 '20 18:10 dem1tris

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 avatar Oct 16 '20 10:10 lolmaus

@lolmaus I'd indicate business logic' state, not related to its "draggability".

dem1tris avatar Oct 17 '20 15:10 dem1tris

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.

lolmaus avatar Oct 17 '20 15:10 lolmaus

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 ¯_(ツ)_/¯

dem1tris avatar Oct 17 '20 15:10 dem1tris

Please show your template code.

lolmaus avatar Oct 17 '20 15:10 lolmaus