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

feat(index): make IndexOptions['uiState'] and UiState react to generic #6288

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jul 18, 2024

Summary

If you're reading uiState (initial ui state) inside init of a widget, it should be the generic UiState which includes this widget's ui state as well.

Result

  • UiState generic to add a specific widget's IndexUiState
  • IndexUiState generic to add a specific widget's IndexUiState
  • InitOptions generic with WidgetDescription
  • init({ uiState }) correctly typed including the specific widget's ui state

@Haroenv Haroenv requested review from a team, dhayab and sarahdayan and removed request for a team July 18, 2024 15:12
@@ -266,7 +266,8 @@ export default (function connectGeoSearch<
return {
$$type,

init(initArgs) {
// Type is explicitly redefined, to avoid having the TWidgetParams type in the definition
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Haroenv Haroenv marked this pull request as draft July 18, 2024 15:51
@Haroenv Haroenv removed request for dhayab and sarahdayan July 18, 2024 15:51
@Haroenv Haroenv dismissed aymeric-giraudet’s stale review July 22, 2024 06:52

thanks for the review, but CI still needs to pass, probably a similar issue as in 0cde49e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants