svelte-ux
svelte-ux copied to clipboard
[MenuField] Re-opening menu while transition closed causes `classes` to be `undefined` (instead of default)
If you quickly click to re-open the menu while it's transitioning closed,classes
within MenuItem
will be set to undefined
instead of default object/styles.
https://github.com/techniq/svelte-ux/assets/177476/a36c772d-0717-4494-8909-c4674aa288a0
Within MenuField
, If you don't pass classes
to MenuItem
or set it explicitly to undefined
(<MenuItem classes={undefined} />
), the issue does not present.
This also occurs if you click on the chevron toggle button to close a menu already opened. See https://github.com/techniq/svelte-ux/pull/155#issuecomment-1864652385 for some context.
Would be good to test with Svelte 5 to see if this is still an issue. For the chevon button issue, ultimately it would be nice if the menu was closed and not quickly re-opened. See issue #93