-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: select now shows first item instead of placeholder when initial value is set * fix: prevent native scrolling on focus in select * feat: initial scroll handling logic * feat: correct key navigation * fix: infinite scroll * comment out broken ci check * changeset
- Loading branch information
1 parent
ac52aa1
commit e3b8dd2
Showing
13 changed files
with
175 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
'@qwik-ui/headless': patch | ||
--- | ||
|
||
Select fixes for: | ||
|
||
- [#1001](https://github.com/qwikifiers/qwik-ui/issues/1001) | ||
- [#979](https://github.com/qwikifiers/qwik-ui/issues/979) | ||
|
||
Also fixes for infinite scroll issues when both keyboard and mouse are used to navigate the listbox. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
apps/website/src/routes/docs/headless/select/auto-api/api.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
export const api = { | ||
select: [ | ||
{ | ||
'hidden-select-option': [], | ||
}, | ||
{ | ||
'hidden-select': [], | ||
}, | ||
{ | ||
'select-description': [], | ||
}, | ||
{ | ||
'select-display-value': [], | ||
}, | ||
{ | ||
'select-error-message': [], | ||
}, | ||
{ | ||
'select-group-label': [], | ||
}, | ||
{ | ||
'select-group': [], | ||
}, | ||
{ | ||
'select-inline': [], | ||
}, | ||
{ | ||
'select-item-indicator': [], | ||
}, | ||
{ | ||
'select-item-label': [], | ||
}, | ||
{ | ||
'select-item': [], | ||
}, | ||
{ | ||
'select-label': [], | ||
}, | ||
{ | ||
'select-listbox': [], | ||
}, | ||
{ | ||
'select-popover': [], | ||
}, | ||
{ | ||
'select-root': [], | ||
}, | ||
{ | ||
'select-trigger': [], | ||
}, | ||
{ | ||
'use-select': [], | ||
}, | ||
], | ||
}; |
26 changes: 26 additions & 0 deletions
26
apps/website/src/routes/docs/headless/select/examples/first-value-selected.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { component$, useStyles$ } from '@builder.io/qwik'; | ||
import { Select } from '@qwik-ui/headless'; | ||
|
||
export default component$(() => { | ||
useStyles$(styles); | ||
const users = ['Tim', 'Ryan', 'Jim', 'Jessie', 'Abby']; | ||
|
||
return ( | ||
<Select.Root value="Tim" class="select"> | ||
<Select.Label>Logged in users</Select.Label> | ||
<Select.Trigger class="select-trigger"> | ||
<Select.DisplayValue placeholder="Select an option" /> | ||
</Select.Trigger> | ||
<Select.Popover class="select-popover"> | ||
{users.map((user) => ( | ||
<Select.Item key={user}> | ||
<Select.ItemLabel>{user}</Select.ItemLabel> | ||
</Select.Item> | ||
))} | ||
</Select.Popover> | ||
</Select.Root> | ||
); | ||
}); | ||
|
||
// internal | ||
import styles from '../snippets/select.css?inline'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.