Skip to content

Commit

Permalink
[@mantine/core] NativeSelect: Fix placeholder not being visible (#2689)
Browse files Browse the repository at this point in the history
* [@mantine/core] NativeSelect: Fix placeholder not showing

* [docs] NativeSelect: Clarify wording

* [core] synchronize .nvmrc and asdf .tool-versions
  • Loading branch information
nmay231 committed Oct 18, 2022
1 parent aa72d3a commit 791487e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 16.15.0
nodejs 14.17.0
2 changes: 1 addition & 1 deletion src/mantine-core/src/NativeSelect/NativeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>((pr

if (placeholder) {
options.unshift(
<option key="placeholder" value="" disabled hidden>
<option key="placeholder" value="" selected disabled hidden>
{placeholder}
</option>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ function Demo() {
<NativeSelect
data={['React', 'Angular', 'Svelte', 'Vue']}
label="Your favorite frameworks/libraries"
placeholder="Pick all that you like"
placeholder="Pick one"
error
/>

<NativeSelect
style={{ marginTop: 15 }}
data={['React', 'Angular', 'Svelte', 'Vue']}
label="Your favorite frameworks/libraries"
placeholder="Pick all that you like"
placeholder="Pick one"
error="Pick at least one item"
/>
</div>
Expand Down

0 comments on commit 791487e

Please sign in to comment.