Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

Commit

Permalink
fix(multi-select): introduce translateWithId (#2175)
Browse files Browse the repository at this point in the history
Fixes #2162.
  • Loading branch information
asudoh authored and emyarod committed Apr 9, 2019
1 parent dbeddf3 commit e769f33
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/MultiSelect/FilterableMultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ export default class FilterableMultiSelect extends React.Component {
* Initialize the component with an open(`true`)/closed(`false`) menu.
*/
open: PropTypes.bool,

/**
* Callback function for translating ListBoxMenuIcon SVG title
*/
translateWithId: PropTypes.func,
};

static getDerivedStateFromProps({ open }, state) {
Expand Down Expand Up @@ -221,6 +226,7 @@ export default class FilterableMultiSelect extends React.Component {
light,
invalid,
invalidText,
translateWithId,
} = this.props;
const className = cx(
`${prefix}--multi-select`,
Expand Down Expand Up @@ -281,7 +287,10 @@ export default class FilterableMultiSelect extends React.Component {
{inputValue && isOpen && (
<ListBox.Selection clearSelection={this.clearInputValue} />
)}
<ListBox.MenuIcon isOpen={isOpen} />
<ListBox.MenuIcon
isOpen={isOpen}
translateWithId={translateWithId}
/>
</ListBox.Field>
{isOpen && (
<ListBox.Menu>
Expand Down

0 comments on commit e769f33

Please sign in to comment.