Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(panel): react to changes on initial render #871

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Sep 29, 2020

you can see this when there's a query which is applied from the URL (sorry, not relevant in the storybook) which makes the canRefine (ais-Panel--noRefinement) different than the default (true)

you can see this when there's a query which is applied from the URL (sorry, not relevant in the storybook) which makes the `canRefine` (`ais-Panel--noRefinement`) different than the default (`true`)
@Haroenv Haroenv requested a review from a team September 29, 2020 13:39
@ghost ghost requested review from eunjae-lee and yannickcr and removed request for a team September 29, 2020 13:39
@Haroenv
Copy link
Contributor Author

Haroenv commented Sep 29, 2020

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Haroenv Haroenv merged commit 56917a0 into master Sep 30, 2020
@Haroenv Haroenv deleted the fix/panel-immediate branch September 30, 2020 08:28
Haroenv added a commit that referenced this pull request Oct 5, 2020
Most of the widgets were assuming the shape of state is always "right", but since #871 it is also called with an empty object. This PR does the following things:

- changes all widgets to work correctly with empty object
- makes sure always a boolean is returned from mapStateToCanRefine to make tests easier
- make tests of mapStateToCanRefine consistent, as well as adding a unit test to each of the methods using {} as state

closes #875
fixes #874
Haroenv added a commit to algolia/instantsearch that referenced this pull request Dec 28, 2022
…arch#871)

you can see this when there's a query which is applied from the URL (sorry, not relevant in the storybook) which makes the `canRefine` (`ais-Panel--noRefinement`) different than the default (`true`)
Haroenv added a commit to algolia/instantsearch that referenced this pull request Dec 28, 2022
…nstantsearch#876)

Most of the widgets were assuming the shape of state is always "right", but since algolia/vue-instantsearch#871 it is also called with an empty object. This PR does the following things:

- changes all widgets to work correctly with empty object
- makes sure always a boolean is returned from mapStateToCanRefine to make tests easier
- make tests of mapStateToCanRefine consistent, as well as adding a unit test to each of the methods using {} as state

closes algolia/vue-instantsearch#875
fixes algolia/vue-instantsearch#874
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants