Skip to content

Commit

Permalink
fix(Dropdown): pass translationWithId through (#2298)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyStair authored and tw15egan committed May 1, 2019
1 parent dbd7a61 commit 5d513ab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export default class Dropdown extends React.Component {
*/
label: PropTypes.node.isRequired,

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

/**
* 'aria-label' of the ListBox component.
*/
Expand Down Expand Up @@ -154,6 +159,7 @@ export default class Dropdown extends React.Component {
id,
titleText,
helperText,
translateWithId,
light,
invalid,
invalidText,
Expand Down Expand Up @@ -236,7 +242,10 @@ export default class Dropdown extends React.Component {
{...getLabelProps()}>
{selectedItem ? itemToString(selectedItem) : label}
</span>
<ListBox.MenuIcon isOpen={isOpen} />
<ListBox.MenuIcon
isOpen={isOpen}
translateWithId={translateWithId}
/>
</ListBox.Field>
{isOpen && (
<ListBox.Menu aria-label={ariaLabel} id={id}>
Expand Down

0 comments on commit 5d513ab

Please sign in to comment.