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

Add TypeScript types to FilterableMultiSelect #16147

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ba8516b
feat: switch from js to ts
guidari Apr 4, 2024
34ac3a0
feat: added types to filterableMultiSelect
guidari Apr 8, 2024
d70b761
fix: added useCombobox
guidari Apr 9, 2024
bf0ac0a
fix: added disabled isItemDisabled
guidari Apr 12, 2024
41b44a1
fix: fixed menu click close
guidari Apr 12, 2024
9acfd35
fix: fixed style for disabled items
guidari Apr 15, 2024
ccc5695
fix: fixed disabled option
guidari Apr 15, 2024
b8f8d5b
fix: added useSelection and interfaces
guidari Apr 16, 2024
4eeedf6
fix: fixed selection using controlledSelectedItem from useSelection
guidari Apr 16, 2024
1a92b7a
fix: fixing selection order
guidari Apr 18, 2024
97cefa9
fixed sorting issue and copied lisboxTrigger changes
preetibansalui Apr 19, 2024
a7d3d33
fix: added onInputValueChange on inputChange
guidari Apr 22, 2024
5b71274
Merge branch 'main' into 12546-filterable-multi-select
guidari Apr 23, 2024
1969ade
fix: revert file extension to avoid error
guidari Apr 23, 2024
2d7bb60
fix: added aria-haspopup to input props
guidari Apr 24, 2024
bfc1e6e
test: added ts-ignore
guidari Apr 24, 2024
bc63134
test: added ts-expect-error in the ComboBox and Filterable
guidari Apr 24, 2024
fcb58f3
fix: added tsx to index.js file
guidari Apr 24, 2024
df4d4ab
fix: accessibility test
preetibansalui Apr 25, 2024
dc48127
test: fixed test failing on multiselect
guidari Apr 25, 2024
ceeeea4
Merge branch '12546-filterable-multi-select' of github.com:guidari/ca…
guidari Apr 25, 2024
6dac74e
fix: added open state to arrow down
guidari Apr 26, 2024
86e7016
fix: fixed disabled seletion on enter & added titleText to propTypes
guidari May 2, 2024
5508ce9
test: updated snapshots
guidari May 2, 2024
b0a50a5
Update packages/react/src/components/ListBox/next/ListBoxTrigger.js
tay1orjones May 8, 2024
4792f31
test: added onChange to storybook
guidari May 8, 2024
c89e7c5
Merge branch 'main' into 12546-filterable-multi-select
guidari May 8, 2024
daf018b
Merge branch 'main' into 12546-filterable-multi-select
tay1orjones May 8, 2024
2ebea98
fix: removed comment
guidari May 8, 2024
dc1be72
Merge branch '12546-filterable-multi-select' of github.com:guidari/ca…
guidari May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/components/MultiSelect/MultiSelect-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test.describe('@avt MultiSelect', () => {
await expect(selection).toBeHidden();
});

test.slow('@avt-keyboard-nav filterable multiselect', async ({ page }) => {
test('@avt-keyboard-nav filterable multiselect', async ({ page }) => {
await visitStory(page, {
component: 'FilterableMultiSelect',
id: 'components-multiselect--filterable',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3755,6 +3755,9 @@ Map {
"sortItems": Object {
"type": "func",
},
"titleText": Object {
"type": "node",
},
"translateWithId": Object {
"type": "func",
},
Expand Down Expand Up @@ -5425,6 +5428,9 @@ Map {
"sortItems": Object {
"type": "func",
},
"titleText": Object {
"type": "node",
},
"translateWithId": Object {
"type": "func",
},
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ const ComboBox = forwardRef(
)}
<ListBoxTrigger
{...buttonProps}
// @ts-expect-error
isOpen={isOpen}
translateWithId={translateWithId}
/>
Expand Down
14 changes: 7 additions & 7 deletions packages/react/src/components/ListBox/next/ListBoxTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ const defaultTranslateWithId = (id) => defaultTranslations[id];
* `ListBoxTrigger` is used to orient the icon up or down depending on the
* state of the menu for a given `ListBox`
*/
const ListBoxTrigger = ({
isOpen,
translateWithId: t = defaultTranslateWithId,
...rest
}) => {
const ListBoxTrigger = React.forwardRef(function ListBoxTrigger(
{ isOpen, translateWithId: t = defaultTranslateWithId, ...rest },
ref
) {
const prefix = usePrefix();
const className = cx({
[`${prefix}--list-box__menu-icon`]: true,
Expand All @@ -45,11 +44,12 @@ const ListBoxTrigger = ({
title={description}
className={className}
type="button"
tabIndex="-1">
tabIndex="-1"
ref={ref}>
<ChevronDown />
</button>
);
};
});

ListBoxTrigger.propTypes = {
/**
Expand Down
Loading
Loading