From 58b675e1befbfb1d641f0cc97084d2758ecac870 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal Date: Sun, 8 Mar 2020 21:16:29 +0530 Subject: [PATCH 01/15] Combobox prop docs added --- src/components/combo_box/combo_box.tsx | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index ef3c5f9905a..e5f3573dea9 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -54,24 +54,57 @@ interface _EuiComboBoxProps Omit, 'onChange'>, DrillProps { 'data-test-subj'?: string; + /** + * Defines wether manner of search is asynchronous or not + */ async: boolean; className?: string; + /** + * when true creates a shorter height box + */ compressed: boolean; + /** + * when true occupies the entire width available + */ fullWidth: boolean; id?: string; inputRef?: RefCallback; + /** + * Shows a button that quickly clears any input + */ isClearable: boolean; + /** + * Disables the combo box + */ isDisabled?: boolean; isInvalid?: boolean; + /** + * Adds/swaps for loading spinner & disables + */ isLoading?: boolean; + /** + * hides the suggestions list + */ noSuggestions?: boolean; onBlur?: FocusEventHandler; + /** + * Called every time the query in the combo box is parsed. + */ onChange?: (options: Array>) => void; onFocus?: FocusEventHandler; onKeyDown?: KeyboardEventHandler; + /** + * Called every time the text query in the search box is parsed. + */ onSearchChange?: (searchValue: string, hasMatchingOptions?: boolean) => void; + /** + * Sets the placeholder of the combo box + */ placeholder?: string; rowHeight?: number; + /** + * when true allows the user to select a single option + */ singleSelection: boolean | EuiComboBoxSingleSelectionShape; } From f2b9de21a22771685055714fac5a7288ee4e6b59 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:37:48 +0530 Subject: [PATCH 02/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index e5f3573dea9..fa41ab6cdf9 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -55,7 +55,7 @@ interface _EuiComboBoxProps DrillProps { 'data-test-subj'?: string; /** - * Defines wether manner of search is asynchronous or not + * Updates the list of options asynchronously */ async: boolean; className?: string; From 1f76ec15b150846b7cf4c6e00192a52312e5ca70 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:37:59 +0530 Subject: [PATCH 03/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index fa41ab6cdf9..eb1c1c98780 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -64,7 +64,7 @@ interface _EuiComboBoxProps */ compressed: boolean; /** - * when true occupies the entire width available + * When `true` expands to the entire width available */ fullWidth: boolean; id?: string; From 2bcce4fee136a1fbe1108704d047532e4f3380d6 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:38:25 +0530 Subject: [PATCH 04/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index eb1c1c98780..d53ca1bef8b 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -103,7 +103,7 @@ interface _EuiComboBoxProps placeholder?: string; rowHeight?: number; /** - * when true allows the user to select a single option + * When `true` only allows the user to select a single option. Set to `{ asPlainText: true }` to not render input selection as pills */ singleSelection: boolean | EuiComboBoxSingleSelectionShape; } From 8d9415a7238a5b10ccdc18b3589fc4abd0638731 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:38:38 +0530 Subject: [PATCH 05/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index d53ca1bef8b..b518bf62613 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -98,7 +98,7 @@ interface _EuiComboBoxProps */ onSearchChange?: (searchValue: string, hasMatchingOptions?: boolean) => void; /** - * Sets the placeholder of the combo box + * Sets the placeholder of the input */ placeholder?: string; rowHeight?: number; From aa91e857ba4153abaad60d948bf3c3c65cbf6040 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:38:49 +0530 Subject: [PATCH 06/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index b518bf62613..c209d715b41 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -83,7 +83,7 @@ interface _EuiComboBoxProps */ isLoading?: boolean; /** - * hides the suggestions list + * Doesn't who the suggestions list/dropdown */ noSuggestions?: boolean; onBlur?: FocusEventHandler; From 7ecfeb1b84762f1fed166d1137b485b6cdb8045c Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:38:58 +0530 Subject: [PATCH 07/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index c209d715b41..b21f6a95a73 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -79,7 +79,7 @@ interface _EuiComboBoxProps isDisabled?: boolean; isInvalid?: boolean; /** - * Adds/swaps for loading spinner & disables + * Swaps the dropdown options for a loading spinner */ isLoading?: boolean; /** From 3b5454597e28ff7a9e7ab17831f26d010f790047 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:39:12 +0530 Subject: [PATCH 08/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index b21f6a95a73..24c270138f2 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -60,7 +60,7 @@ interface _EuiComboBoxProps async: boolean; className?: string; /** - * when true creates a shorter height box + * When `true` creates a shorter height input */ compressed: boolean; /** From 9e869daf0b5ef5d5399d1c9bcfbd8a96bd33d6a1 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Wed, 11 Mar 2020 03:39:27 +0530 Subject: [PATCH 09/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index 24c270138f2..e8a9312a362 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -74,7 +74,7 @@ interface _EuiComboBoxProps */ isClearable: boolean; /** - * Disables the combo box + * Disables the input */ isDisabled?: boolean; isInvalid?: boolean; From c25a9fc560ed1c8d892e2de41728f226b6b6b493 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:34 +0530 Subject: [PATCH 10/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index e8a9312a362..b0a670af4d8 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -83,7 +83,7 @@ interface _EuiComboBoxProps */ isLoading?: boolean; /** - * Doesn't who the suggestions list/dropdown + * Doesn't show the suggestions list/dropdown */ noSuggestions?: boolean; onBlur?: FocusEventHandler; From 14858d631ff423d0ab0a9af6c6d9808608ac2cb8 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:42 +0530 Subject: [PATCH 11/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index b0a670af4d8..d68d1c6361d 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -94,7 +94,7 @@ interface _EuiComboBoxProps onFocus?: FocusEventHandler; onKeyDown?: KeyboardEventHandler; /** - * Called every time the text query in the search box is parsed. + * Called every time the text query in the search box is parsed */ onSearchChange?: (searchValue: string, hasMatchingOptions?: boolean) => void; /** From 954ee2eeadf85f913da34c787698b0230dc136cf Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:50 +0530 Subject: [PATCH 12/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index d68d1c6361d..5583f5c7bae 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -101,6 +101,9 @@ interface _EuiComboBoxProps * Sets the placeholder of the input */ placeholder?: string; + /** + * Every option must be the same height and must be explicitly set if using a custom render + */ rowHeight?: number; /** * When `true` only allows the user to select a single option. Set to `{ asPlainText: true }` to not render input selection as pills From 729689870100cf4fc6aa78a64d4290b9bc74567c Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Thu, 12 Mar 2020 20:53:59 +0530 Subject: [PATCH 13/15] Update src/components/combo_box/combo_box.tsx Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- src/components/combo_box/combo_box.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index 5583f5c7bae..0341ecf2d5c 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -88,7 +88,7 @@ interface _EuiComboBoxProps noSuggestions?: boolean; onBlur?: FocusEventHandler; /** - * Called every time the query in the combo box is parsed. + * Called every time the query in the combo box is parsed */ onChange?: (options: Array>) => void; onFocus?: FocusEventHandler; From 49286fc9156aa1f3075751659fdd21777e0e61d7 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal Date: Thu, 12 Mar 2020 21:43:09 +0530 Subject: [PATCH 14/15] CL --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04ca018c2f7..a0e0fc65de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added props description for `EuiComboBox` ([#3007](https://github.com/elastic/eui/pull/3007)) - Added `EuiDataGrid`'s default sort order property ([#2987](https://github.com/elastic/eui/pull/2987)) - Fixed `EuiDataGrid`'s pagination visibility when changing rows per page ([#2978](https://github.com/elastic/eui/pull/2978)) - Added `highlightAll` prop to `EuiHighlight` to highlight all matches ([#2957](https://github.com/elastic/eui/pull/2957)) From ff15b47906e08313eafb8a84af2216793cfe95ab Mon Sep 17 00:00:00 2001 From: Anish Aggarwal <43617894+anishagg17@users.noreply.github.com> Date: Thu, 12 Mar 2020 21:51:54 +0530 Subject: [PATCH 15/15] Update CHANGELOG.md Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e38f3177315..3e46c0961a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -- Added props description for `EuiComboBox` ([#3007](https://github.com/elastic/eui/pull/3007)) +- Added props descriptions for `EuiComboBox` ([#3007](https://github.com/elastic/eui/pull/3007)) - Exported `dateFormatAliases` as a part of the public API ([#3043](https://github.com/elastic/eui/pull/3043)) - Exported `EuiTextProps` type definition ([#3039](https://github.com/elastic/eui/pull/3039)) - Removed `role` attribute from `EuiImage`([#3036](https://github.com/elastic/eui/pull/3036))