Skip to content

Commit

Permalink
Merge branch 'master' into 5079-overflowmenu-click-handler-optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
asudoh authored Feb 15, 2020
2 parents 2423f3f + 7e4c0e5 commit bb8930e
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 164 deletions.
18 changes: 0 additions & 18 deletions packages/icons/svg/16/app-switcher.svg

This file was deleted.

13 changes: 0 additions & 13 deletions packages/icons/svg/16/overflow-menu--horizontal.svg

This file was deleted.

13 changes: 0 additions & 13 deletions packages/icons/svg/16/overflow-menu--vertical.svg

This file was deleted.

18 changes: 0 additions & 18 deletions packages/icons/svg/16/switcher.svg

This file was deleted.

20 changes: 0 additions & 20 deletions packages/icons/svg/20/app-switcher.svg

This file was deleted.

20 changes: 0 additions & 20 deletions packages/icons/svg/20/switcher.svg

This file was deleted.

18 changes: 0 additions & 18 deletions packages/icons/svg/24/app-switcher.svg

This file was deleted.

18 changes: 0 additions & 18 deletions packages/icons/svg/24/switcher.svg

This file was deleted.

18 changes: 9 additions & 9 deletions packages/icons/svg/32/app-switcher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion packages/icons/svg/32/overflow-menu--horizontal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion packages/icons/svg/32/overflow-menu--vertical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions packages/icons/svg/32/switcher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const TableToolbarSearch = ({
return (
<div
tabIndex={expandedState ? '-1' : tabIndex}
role="search"
ref={searchRef}
onClick={event => onClick(event)}
onFocus={event => handleExpand(event, true)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,6 @@ exports[`DataTable should render 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
role="search"
tabIndex="0"
>
<Search
Expand All @@ -2261,7 +2260,9 @@ exports[`DataTable should render 1`] = `
value=""
>
<div
aria-labelledby="custom-id-search"
className="bx--search bx--search--sm"
role="search"
>
<ForwardRef(Search16)
className="bx--search-magnifier"
Expand Down Expand Up @@ -2298,6 +2299,7 @@ exports[`DataTable should render 1`] = `
<label
className="bx--label"
htmlFor="custom-id"
id="custom-id-search"
>
Filter table
</label>
Expand Down Expand Up @@ -3242,7 +3244,6 @@ exports[`DataTable sticky header should render 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
role="search"
tabIndex="0"
>
<Search
Expand All @@ -3258,7 +3259,9 @@ exports[`DataTable sticky header should render 1`] = `
value=""
>
<div
aria-labelledby="custom-id-search"
className="bx--search bx--search--sm"
role="search"
>
<ForwardRef(Search16)
className="bx--search-magnifier"
Expand Down Expand Up @@ -3295,6 +3298,7 @@ exports[`DataTable sticky header should render 1`] = `
<label
className="bx--label"
htmlFor="custom-id"
id="custom-id-search"
>
Filter table
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ exports[`DataTable.TableToolbarSearch should render 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
role="search"
tabIndex="0"
>
<Search
Expand All @@ -31,7 +30,9 @@ exports[`DataTable.TableToolbarSearch should render 1`] = `
value=""
>
<div
aria-labelledby="custom-id-search"
className="bx--search bx--search--sm custom-class"
role="search"
>
<ForwardRef(Search16)
className="bx--search-magnifier"
Expand Down Expand Up @@ -68,6 +69,7 @@ exports[`DataTable.TableToolbarSearch should render 1`] = `
<label
className="bx--label"
htmlFor="custom-id"
id="custom-id-search"
>
Filter table
</label>
Expand Down
6 changes: 4 additions & 2 deletions packages/react/src/components/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ export default class Search extends Component {

const CloseIconX = size === 'xl' ? Close20 : Close16;

const searchId = `${id}-search`;

return (
<div className={searchClasses}>
<div role="search" aria-labelledby={searchId} className={searchClasses}>
<Search16 className={`${prefix}--search-magnifier`} />
<label htmlFor={id} className={`${prefix}--label`}>
<label id={searchId} htmlFor={id} className={`${prefix}--label`}>
{labelText}
</label>
<input
Expand Down

0 comments on commit bb8930e

Please sign in to comment.