thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
587 stars 38 forks source link

Fold others when unfolding a row #245

Open pdwonline opened 7 months ago

pdwonline commented 7 months ago

I do use the fold-entity row a lot. It makes the UI simple and clean! However, it can become complex again when all unfolded rows remain open. Could it be possible to close all other fold-entity rows on a card when unfolding one?

Example: my living room card:

afbeelding

When unfolding the lights:

afbeelding

and then unfolding the options for the lights:

afbeelding

Then when I open the next option, the previous should be closed:

afbeelding
ildar170975 commented 7 months ago

So, a state of one independent card should affect states of other independent cards, is that the proposal?

thomasloven commented 7 months ago

That was my first thought too, but this may not be so far fetched actually... It might be possible to detect when a fold-entity-row loses focus after being opened. I'll have to think about this... at some point. Don't hold your breath.

ildar170975 commented 7 months ago

Thomas, if you find a way to achieve this “auto-fold” behavior - please make this behavior optional. In some cases this may be awesome, in some - not desired.

thomasloven commented 7 months ago

Absolutely. It'd annoy the hell out of me.

pdwonline commented 7 months ago

small complication is that it should not close a parent fold ;)