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: <select size value> with value not matching any option results in first option being selected #24469

Open
eps1lon opened this issue Apr 29, 2022 · 2 comments
Labels
Component: DOM Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug

Comments

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 29, 2022

React version: 18.1.0, 17.0.2

Steps To Reproduce

  1. render <select value="not-an-option" size="2"><option value="an-option">one</option></select>

Link to code example: https://codesandbox.io/s/react-18-select-value-with-value-not-matching-option-wopmt9?file=/src/index.js

The current behavior

The first option will be marked as selected

The expected behavior

No option should be selected

#10691 was asking for a warning.

@bentongxyz
Copy link

👋 May I work on this if possible as a first issue

@itolimaesther
Copy link

itolimaesther commented Jul 28, 2023

I would love to work on this as a first timer issue if it's still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: DOM Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants