Skip to content

Commit

Permalink
Fix #3721: Remove filterInputAutoFocus (#3723)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Nov 30, 2022
1 parent f8d120d commit b56c806
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions api-generator/components/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ const MultiSelectProps = [
default: 'true',
description: 'When specified, displays an input field to filter the items on keyup.'
},
{
name: 'filterInputAutoFocus',
type: 'boolean',
default: 'true',
description: 'When the panel is opened, it specifies that the filter input should focus automatically.'
},
{
name: 'filterBy',
type: 'string',
Expand Down
6 changes: 0 additions & 6 deletions components/doc/multiselect/apidoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ export function ApiDoc(props) {
<td>true</td>
<td>When specified, displays an input field to filter the items on keyup.</td>
</tr>
<tr>
<td>filterInputAutoFocus</td>
<td>boolean</td>
<td>true</td>
<td>When the panel is opened, it specifies that the filter input should focus automatically.</td>
</tr>
<tr>
<td>filterBy</td>
<td>string</td>
Expand Down
1 change: 0 additions & 1 deletion components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ MultiSelect.defaultProps = {
emptyFilterMessage: null,
filter: false,
filterBy: null,
filterInputAutoFocus: true,
filterLocale: undefined,
filterMatchMode: 'contains',
filterPlaceholder: null,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelectPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const MultiSelectPanel = React.memo(

const onEntered = () => {
props.onEntered(() => {
if (props.filter && props.filterInputAutoFocus) {
if (props.filter && filterInputRef.current) {
DomHandler.focus(filterInputRef.current, false);
}
});
Expand Down
1 change: 0 additions & 1 deletion components/lib/multiselect/multiselect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export interface MultiSelectProps extends Omit<React.DetailedHTMLProps<React.Inp
emptyFilterMessage?: MultiSelectEmptyFilterMessageType;
filter?: boolean;
filterBy?: string;
filterInputAutoFocus?: boolean;
filterLocale?: string;
filterMatchMode?: string;
filterPlaceholder?: string;
Expand Down

0 comments on commit b56c806

Please sign in to comment.