Skip to content

Commit 91d03f0

Browse files
Aaron Caldwellkibanamachine
andauthored
Increase index pattern select limit to 1000 (#92093)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent 0280d5a commit 91d03f0

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternselectprops.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export declare type IndexPatternSelectProps = Required<Omit<EuiComboBoxProps<any
1212
indexPatternId: string;
1313
fieldTypes?: string[];
1414
onNoIndexPatterns?: () => void;
15+
maxIndexPatterns?: number;
1516
};
1617
```

src/plugins/data/public/public.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ export type IndexPatternSelectProps = Required<Omit<EuiComboBoxProps<any>, 'isLo
15311531
indexPatternId: string;
15321532
fieldTypes?: string[];
15331533
onNoIndexPatterns?: () => void;
1534+
maxIndexPatterns?: number;
15341535
};
15351536

15361537
// Warning: (ae-missing-release-tag) "IndexPatternSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)

src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type IndexPatternSelectProps = Required<
2525
indexPatternId: string;
2626
fieldTypes?: string[];
2727
onNoIndexPatterns?: () => void;
28+
maxIndexPatterns?: number;
2829
};
2930

3031
export type IndexPatternSelectInternalProps = IndexPatternSelectProps & {
@@ -41,6 +42,10 @@ interface IndexPatternSelectState {
4142
// Needed for React.lazy
4243
// eslint-disable-next-line import/no-default-export
4344
export default class IndexPatternSelect extends Component<IndexPatternSelectInternalProps> {
45+
static defaultProps: {
46+
maxIndexPatterns: 1000;
47+
};
48+
4449
private isMounted: boolean = false;
4550
state: IndexPatternSelectState;
4651

@@ -103,7 +108,10 @@ export default class IndexPatternSelect extends Component<IndexPatternSelectInte
103108

104109
debouncedFetch = _.debounce(async (searchValue: string) => {
105110
const { fieldTypes, onNoIndexPatterns, indexPatternService } = this.props;
106-
const indexPatterns = await indexPatternService.find(`${searchValue}*`, 100);
111+
const indexPatterns = await indexPatternService.find(
112+
`${searchValue}*`,
113+
this.props.maxIndexPatterns
114+
);
107115

108116
// We need this check to handle the case where search results come back in a different
109117
// order than they were sent out. Only load results for the most recent search.

0 commit comments

Comments
 (0)