Skip to content

Conversation

@Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Sep 8, 2025

Summary

Accept composed widgets - a composed widget is a widget that itself is an array of widgets - as an argument to addWidgets and removeWidgets.

This will be useful for InstantSearch.js autocomplete widget that will have multiple widgets composing the single widget.

This enables the "pseudo-widget" signature of function myWidget(params): Widget[] instead of just function myWidget(params): Widget

Result

addWidgets and removeWidgets accept a widget that itself is a list, by flattening the list before using it.

FX-3501

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 8, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f820376:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv requested review from a team, aymeric-giraudet and dhayab and removed request for a team September 8, 2025 13:42
@Haroenv Haroenv marked this pull request as ready for review September 8, 2025 13:42
@Haroenv Haroenv merged commit fb5ca81 into master Sep 9, 2025
14 checks passed
@Haroenv Haroenv deleted the feat/index-multiple-widgets branch September 9, 2025 07:57
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.

3 participants