Skip to content

Commit

Permalink
feat: combobox filtering and autocomplete (#1125)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
prsdthkr committed Aug 3, 2020
1 parent 38a2243 commit d84ea0b
Show file tree
Hide file tree
Showing 50 changed files with 3,226 additions and 342 deletions.
1,550 changes: 1,550 additions & 0 deletions data/countries.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions devtools/buildVisualStories.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ componentDirs.map((directory) => {
directory.fileNames.map((fileName) => {
// get only stories.js files
if (fileName.includes('.stories.js')) {
// Grab the component name
// Grab the component name
const componentName = fileName.substr(0, fileName.indexOf('.'));
// TODO: reenable storyshots for examples using hooks in storybook@6
// https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.43
if (componentName === 'Calendar'
|| componentName === 'Dialog') {
|| componentName === 'Dialog') {
return;
}

Expand All @@ -39,7 +39,9 @@ export default {
};
export const ${componentName} = () => {
let storyNames = Object.keys(stories).filter(story => story !== 'default');
let storyNames = Object.keys(stories).filter(story => {
return story !== 'default' && story !== 'dev';
});
return (<>{storyNames.map((item, index) => <div key={index}>{stories[item]()}</div>)}</>);
};
Expand Down
Loading

0 comments on commit d84ea0b

Please sign in to comment.