lucca-front
lucca-front copied to clipboard
[Multi Select] Disabled & checked option and chip
When an option is selected AND disabled. This is not possible to uncheck it from the listbox. But our displayer still provide chips with clear button. We should remove this button when the option is disabled.
(Asperge in this example)
This is definitely not trivial, might want to assign a priority to see if it's worth focusing on it or not.
A bit more details on why it's not trivial:
Options are disabled using the LuDisabledOptionDirective that will get LU_OPTION_CONTEXT and emit on the isDisabled$ Observable inside of it.
But this happens inside the panel, which is far away from the displayer. The default displayer is getting LU_OPTION_CONTEXT and for some reason, its option$ Observable is emitting a T[] but the isDisabled$ Observable is still emitting a single boolean, which means displayer doesn't have the info about whether it's disabled or not.
I'm having a hard time understanding why the same token is used for two different contexts but it was the solution at the moment it was implemented, however, being able to have the disabled value for each option would be required.