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

fix(SearchBox): propagate the classname overrides to children #454

Merged
merged 3 commits into from
May 28, 2018

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented May 25, 2018

We never noticed it because this wasn't a very popular API, but if you use vanilla ais-search-box, you can not override the class names of the input or the clear which are nested within the component.

This is not an issue we have in v2, since we removed this API and no longer nest components in eachother, so it doesn't need to be passed around.

Using the :class-names API to pretend v1 is using InstantSearch.css with @francoischalifour made me realise that this is a useful API to keep, so it should be replicated in v2 as well.

(this change was tested in @francoischalifour's node_modules)

We never noticed it because this wasn't a very popular API, but if you use vanilla ais-search-box, you can not override the class names of the input or the clear which are nested within the component.

This is not an issue we have in v2, since we removed this API and no longer nest components in eachother, so it doesn't need to be passed around.

Using the `:class-names` API to pretend v1 is using InstantSearch.css with @francoischalifour made me realise that this is a useful API to keep, so it should be replicated in v2 as well.
Copy link
Member

@rayrutjes rayrutjes left a comment

Choose a reason for hiding this comment

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

LGTM

@Haroenv Haroenv force-pushed the fix/searchbox-classes branch from 2e79451 to 98a0b91 Compare May 28, 2018 16:38
@Haroenv Haroenv merged commit d91ada8 into master May 28, 2018
@Haroenv Haroenv deleted the fix/searchbox-classes branch May 28, 2018 20:10
Haroenv added a commit that referenced this pull request May 29, 2018
* fix(SearchBox): propagate the classname overrides to children

We never noticed it because this wasn't a very popular API, but if you use vanilla ais-search-box, you can not override the class names of the input or the clear which are nested within the component.

This is not an issue we have in v2, since we removed this API and no longer nest components in eachother, so it doesn't need to be passed around.

Using the `:class-names` API to pretend v1 is using InstantSearch.css with @francoischalifour made me realise that this is a useful API to keep, so it should be replicated in v2 as well.

* test: update snapshots
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