Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Multiple Datasource] Pass selected data sources to plugin consumers when the multi-select component initially loads #6333

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

huyaboo
Copy link
Member

@huyaboo huyaboo commented Apr 3, 2024

Description

The multi-selectable component does not call the callback function on initial load of the component. This means that plugins cannot initially fetch the dataSourceIds when first rendering the page. This PR makes a call to the callback function upon componentDidMount()

Issues Resolved

Closes #6324

Screenshot

Screen.Recording.2024-04-03.at.11.29.24.AM.mov

Testing the changes

In the multi-select component, a console.log() statement was added to the callback function and this callback function was passed into the multi-select component. Because the log statement was called without any selection changes, it shows that the callback function was called when the multi-select component initially loaded.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.50%. Comparing base (cf43af3) to head (b9ba13d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6333   +/-   ##
=======================================
  Coverage   67.49%   67.50%           
=======================================
  Files        3376     3376           
  Lines       65798    65800    +2     
  Branches    10639    10639           
=======================================
+ Hits        44413    44415    +2     
  Misses      18801    18801           
  Partials     2584     2584           
Flag Coverage Δ
Linux_1 32.60% <ø> (ø)
Linux_2 55.60% <ø> (ø)
Linux_3 44.84% <100.00%> (+<0.01%) ⬆️
Linux_4 35.02% <0.00%> (-0.01%) ⬇️
Windows_1 32.62% <ø> (ø)
Windows_2 55.57% <ø> (ø)
Windows_3 44.85% <100.00%> (+<0.01%) ⬆️
Windows_4 35.02% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BionIT BionIT changed the title [Multiple Datasource] Add callback function to initial load [Multiple Datasource] Pass selected data sources to plugin consumers when the multi-select component initially loads Apr 3, 2024
@bandinib-amzn bandinib-amzn merged commit cb24346 into opensearch-project:main Apr 3, 2024
94 checks passed
@bandinib-amzn bandinib-amzn added the multiple datasource multiple datasource project label Apr 3, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 3, 2024
…when the multi-select component initially loads (#6333)

* Add callback function to initial load

Signed-off-by: Huy Nguyen <[email protected]>

* Add to CHANGELOG

Signed-off-by: Huy Nguyen <[email protected]>

---------

Signed-off-by: Huy Nguyen <[email protected]>
(cherry picked from commit cb24346)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
zhongnansu pushed a commit that referenced this pull request Apr 3, 2024
…when the multi-select component initially loads (#6333) (#6335)

* Add callback function to initial load

Signed-off-by: Huy Nguyen <[email protected]>

* Add to CHANGELOG

Signed-off-by: Huy Nguyen <[email protected]>

---------

Signed-off-by: Huy Nguyen <[email protected]>
(cherry picked from commit cb24346)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@huyaboo huyaboo deleted the multi-select branch April 18, 2024 00:15
@huyaboo huyaboo restored the multi-select branch April 18, 2024 00:16
@huyaboo huyaboo deleted the multi-select branch April 18, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
3 participants