How to fix - 'type' attribute cannot be dynamic if input uses two-way binding

preview_player
Показать описание
Just in case you've run into this issue..

Рекомендации по теме
Комментарии
Автор

Issue with this method is that the password type isn't applied in the server-side render, which means if the user has javascript disabled it will display as a regular text field.

electravirus
Автор

This approach caused rendering issues for me with tailwindcss. The input was visible but unstyled. It looked as if the action 'typeAction' ran after the element was visible on the screen leading to the input getting it's type=text styles (from global tailwind css) after being shown on the screen.

shubitoxX
Автор

I was using event handlers to set the value Exported the value so that parent components can bind to the Exported value

parablesboltnoel
Автор

Thanks bro. You no longer doing the Scrimba Svelte bootcamp course?

sarugami
Автор

did you raise an issue on github Svelte about this? anyway thanks a lot for all your effort SM!

libertady
Автор

thanks bro!
if anyone wonders what type for "node" in typescript, its HTMLElementInput

ickynho
Автор

Here are a couple of discussions/explanations for this behavior:

JyrkiGrohn