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

[Bug]: SfSelect uses selected attribute for placeholder option #2931

Closed
1 of 3 tasks
dkacper opened this issue Jul 18, 2023 · 1 comment
Closed
1 of 3 tasks

[Bug]: SfSelect uses selected attribute for placeholder option #2931

dkacper opened this issue Jul 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@dkacper
Copy link
Contributor

dkacper commented Jul 18, 2023

Describe the Bug

When using placeholder on SfSelect component I receive an error in the console that says I should not use selected attribute on the select element. I discovered the bug in React, but I think it applies to Vue as well.

SfSelect error

Expected behavior

No errors in the console. According to the error message, placeholder should use defaultValue or value on the select element.

Steps to reproduce

  1. Run React app.
  2. Use SfSelect with any placeholder
  3. See the console.

I'm currently using SFUI v2.2.0, but I can still see this on the v2 master branch. https://github.com/vuestorefront/storefront-ui/blob/v2-develop/packages/sfui/frameworks/react/components/SfSelect/SfSelect.tsx#L67

SFUI version

2.2.0

Framework

React, Next 13

Node version

20

Browser

Brave, Chrome

OS

macOS

Relevant log output

No response

Able to fix / change the documentation?

  • Yes
  • No

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dkacper dkacper added the bug Something isn't working label Jul 18, 2023
@Szymon-dziewonski
Copy link
Contributor

Szymon-dziewonski commented Oct 3, 2023

Hey @dkacper this issue was fixed in PR . Closing this issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants