Skip to content

Commit d84ea0b

Browse files
authored
feat: combobox filtering and autocomplete (#1125)
In this change, we make the Combobox filterable and enable autocomplete capabilities. We have tried to align with the specification at https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html. There is are some minor deviations from the specification because of the way we filter the Combobox options. fixes #1019
1 parent 38a2243 commit d84ea0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3226
-342
lines changed

data/countries.json

+1,550
Large diffs are not rendered by default.

devtools/buildVisualStories.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ componentDirs.map((directory) => {
2121
directory.fileNames.map((fileName) => {
2222
// get only stories.js files
2323
if (fileName.includes('.stories.js')) {
24-
// Grab the component name
24+
// Grab the component name
2525
const componentName = fileName.substr(0, fileName.indexOf('.'));
2626
// TODO: reenable storyshots for examples using hooks in storybook@6
2727
// https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.43
2828
if (componentName === 'Calendar'
29-
|| componentName === 'Dialog') {
29+
|| componentName === 'Dialog') {
3030
return;
3131
}
3232

@@ -39,7 +39,9 @@ export default {
3939
};
4040
4141
export const ${componentName} = () => {
42-
let storyNames = Object.keys(stories).filter(story => story !== 'default');
42+
let storyNames = Object.keys(stories).filter(story => {
43+
return story !== 'default' && story !== 'dev';
44+
});
4345
4446
return (<>{storyNames.map((item, index) => <div key={index}>{stories[item]()}</div>)}</>);
4547
};

0 commit comments

Comments
 (0)