Issue
On focus of the dropdown, I am able to rotate the indicator, but once an item is selected and the list is closed, the indicator does not rotate back due to the focused CSS class not being removed. I think the intent of this focused class doesn't work for my required behavior. I can solve the issue by binding to the listOpen prop, but I have way too many dropdowns to do this for and the code would be redundant.
Possible Solution
Use the listOpen property internally to toggle a new css class "listOpen" on the list container (selectContainer) so that it can be used to determine when the indicator should be in the up or down position.
REPL: https://svelte.dev/repl/c7d90b1645d44499b4bb25ff3d3a0808?version=3.20.1
Issue On focus of the dropdown, I am able to rotate the indicator, but once an item is selected and the list is closed, the indicator does not rotate back due to the focused CSS class not being removed. I think the intent of this focused class doesn't work for my required behavior. I can solve the issue by binding to the
listOpen
prop, but I have way too many dropdowns to do this for and the code would be redundant.Possible Solution Use the
listOpen
property internally to toggle a new css class "listOpen" on the list container (selectContainer
) so that it can be used to determine when the indicator should be in the up or down position.