Skip to content

Commit

Permalink
Update variables in pipeline selection
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Ung <nicholasung22@gmail.com>
  • Loading branch information
nung22 committed Dec 19, 2023
1 parent a7fba79 commit 765cf71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ describe('Flyout component', () => {
wrapper.find('EuiCodeEditor').prop('onChange')?.({ target: { value: '' } });
wrapper.find('EuiSelect').prop('onChange')?.({ target: {} });
wrapper.find('EuiSelect').prop('onBlur')?.({ target: {} });
wrapper.find('EuiComboBox').prop('onChange')?.({ target: { selectedOptions: [] } });
wrapper.find('EuiComboBox').prop('onChange')?.({ target: { selectedPipelineOptions: [] } });
wrapper.find('EuiComboBox').prop('onChange')?.({
target: { selectedOptions: [{ label: '_none' }] },
target: { selectedPipelineOptions: [{ label: '_none' }] },
});
});
expect(setQueryString).toHaveBeenCalledTimes(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export const SearchConfig: FunctionComponent<SearchConfigProps> = ({
// Add the '_none' option to the pipeline dropdown (runs the index without a pipeline).
sortedPipelines.push({ label: '_none' });

// On select index for ComboBox
const onChangePipeline = (selectedOptions: string | any[]) => {
setPipeline(selectedOptions[0]?.label || '');
// On select pipeline for ComboBox
const onChangePipeline = (selectedPipelineOptions: string | any[]) => {
setPipeline(selectedPipelineOptions[0]?.label || '');
};

// Select index on blur
Expand Down

0 comments on commit 765cf71

Please sign in to comment.