TextField and Select do not suppport conditionals around named slots for leadingIcon and trailingIcon #230
Labels
enhancement
New feature or request
upstream
Something is wrong with an upstream library, and it affects SMUI.
Describe the bug
TextField and Select components render icons incorrectly when they are wrapped in a conditional. This occurs in SMUI 3 and up.
To Reproduce
Expected behavior
If there is a conditional wrapping a named slot, and the conditional evaluates to true, the component should render the same as if there was no conditional at all.
Screenshots

Here's an example of is what is output when leadingIcon is truthy:
I think this is because these components are using $$slots to provide class names but is not re-rendering when $$slots changes:
svelte-material-ui/packages/textfield/Textfield.svelte
Line 26 in 000375c
This looks like it's related to Svelte $$slots not updating with conditionals: sveltejs/svelte#5312
The text was updated successfully, but these errors were encountered: