Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Input: make left/right-adornments reactive #3354

Closed
oddvernes opened this issue Mar 19, 2024 · 0 comments · Fixed by #3380
Closed

🐛 Input: make left/right-adornments reactive #3354

oddvernes opened this issue Mar 19, 2024 · 0 comments · Fixed by #3380
Assignees
Labels
🐛 bug Something isn't working core-react eds-core-react

Comments

@oddvernes
Copy link
Collaborator

Currently if an icon is added to a textfield dynamically such as adding an error icon when invalid, the input padding is not updated causing the icon to potentially overlap other content such as the calendar button when type="date".
One workaround is to force refrech the component using key

key={canSubmit.toString() + '1'}
inputIcon={canSubmit && <Icon data={error} />}

but we should make this work automatically as adding and removing warning icon is probably a common use case
@oddvernes oddvernes added 🐛 bug Something isn't working core-react eds-core-react labels Mar 19, 2024
@oddvernes oddvernes self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working core-react eds-core-react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant