Skip to content

Commit

Permalink
Fixed #2258 - Failed prop type: Invalid prop appendTo of type string …
Browse files Browse the repository at this point in the history
…supplied to DropdownPanel, expected object.
  • Loading branch information
mertsincan committed Nov 6, 2021
1 parent f075f91 commit ded10ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/dropdown/Dropdown.js
Expand Up @@ -977,6 +977,7 @@ export class Dropdown extends Component {
});
let visibleOptions = this.getVisibleOptions();
let selectedOption = this.getSelectedOption();
let appendTo = this.props.appendTo || PrimeReact.appendTo;

let hiddenSelect = this.renderHiddenSelect(selectedOption);
let keyboardHelper = this.renderKeyboardHelper();
Expand All @@ -992,7 +993,7 @@ export class Dropdown extends Component {
{labelElement}
{clearIcon}
{dropdownIcon}
<DropdownPanel ref={this.overlayRef} visibleOptions={visibleOptions} {...this.props} onClick={this.onPanelClick} onOptionClick={this.onOptionClick}
<DropdownPanel ref={this.overlayRef} visibleOptions={visibleOptions} {...this.props} appendTo={appendTo} onClick={this.onPanelClick} onOptionClick={this.onOptionClick}
filterValue={this.state.filter} hasFilter={this.hasFilter} onFilterClearIconClick={this.onFilterClearIconClick} onFilterInputKeyDown={this.onFilterInputKeyDown} onFilterInputChange={this.onFilterInputChange}
getOptionLabel={this.getOptionLabel} getOptionRenderKey={this.getOptionRenderKey} isOptionDisabled={this.isOptionDisabled}
getOptionGroupChildren={this.getOptionGroupChildren} getOptionGroupLabel={this.getOptionGroupLabel} getOptionGroupRenderKey={this.getOptionGroupRenderKey}
Expand Down

0 comments on commit ded10ff

Please sign in to comment.