Skip to content

Commit

Permalink
Pass onRenderItem to onRenderContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-ep committed Oct 17, 2022
1 parent fec73cb commit f3d56fc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/react/src/components/Dropdown/Dropdown.base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class DropdownInternal extends React.Component<IDropdownInternalProps, IDropdown
onRenderContainer = this._onRenderContainer,
onRenderCaretDown = this._onRenderCaretDown,
onRenderLabel = this._onRenderLabel,
onRenderItem = this._onRenderItem,
hoisted: { selectedIndices },
} = props;
const { isOpen, calloutRenderEdge, hasFocus } = this.state;
Expand Down Expand Up @@ -397,7 +398,15 @@ class DropdownInternal extends React.Component<IDropdownInternalProps, IDropdown
</span>
<span className={this._classNames.caretDownWrapper}>{onRenderCaretDown(props, this._onRenderCaretDown)}</span>
</div>
{isOpen && onRenderContainer({ ...props, onDismiss: this._onDismiss }, this._onRenderContainer)}
{isOpen &&
onRenderContainer(
{
...props,
onDismiss: this._onDismiss,
onRenderItem,
},
this._onRenderContainer,
)}
{hasErrorMessage && (
<div role="alert" id={errorMessageId} className={this._classNames.errorMessage}>
{errorMessage}
Expand Down

0 comments on commit f3d56fc

Please sign in to comment.