From 932952e9874ddca3577a309e22f9ae6a81b52c0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Apr 2024 20:03:09 +0000 Subject: [PATCH] [Multiple Datasource] Pass selected data sources to plugin consumers when the multi-select component initially loads (#6333) * Add callback function to initial load Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> * Add to CHANGELOG Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> --------- Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com> (cherry picked from commit cb24346566283e9e2e267ef4476ae5996c4d7f58) Signed-off-by: github-actions[bot] # Conflicts: # CHANGELOG.md --- .../data_source_multi_selectable.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/data_source_management/public/components/data_source_multi_selectable/data_source_multi_selectable.tsx b/src/plugins/data_source_management/public/components/data_source_multi_selectable/data_source_multi_selectable.tsx index 8405a37a43c2..2bcf57899189 100644 --- a/src/plugins/data_source_management/public/components/data_source_multi_selectable/data_source_multi_selectable.tsx +++ b/src/plugins/data_source_management/public/components/data_source_multi_selectable/data_source_multi_selectable.tsx @@ -70,6 +70,10 @@ export class DataSourceMultiSelectable extends React.Component< ...this.state, selectedOptions, }); + + this.props.onSelectedDataSources( + selectedOptions.filter((option) => option.checked === 'on') + ); } }) .catch(() => {