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

HitsPerPageSelector root css class being applied twice #2397

Closed
Corys8646 opened this issue Sep 27, 2017 · 2 comments
Closed

HitsPerPageSelector root css class being applied twice #2397

Corys8646 opened this issue Sep 27, 2017 · 2 comments
Assignees

Comments

@Corys8646
Copy link

Corys8646 commented Sep 27, 2017

Apologies if this is intended behavior, but the docs make me believe this is possibly a bug.
Using V2 of Instantsearch and adding a HitsPerPage selector, also adding a css class to the root cssClasses Object.

Problem is, the class is being added to the <select> item as well as the parent div.

Trying to add a bootstrap form-control to the select element.

I've got a fiddle here: https://jsfiddle.net/Corys8646/8mhxqayf/1/

@bobylito
Copy link
Contributor

bobylito commented Sep 27, 2017

Hi @Corys8646 thanks for opening this issue. Are you reporting this issue for v2? Also I can't find your link to the jsFiddle you made :)!!

Ok indeed. On it!

@bobylito bobylito self-assigned this Sep 27, 2017
bobylito pushed a commit that referenced this issue Oct 2, 2017
The implementation of the React `selector` was applying the root css
classname that is already applied by the headerfooter. In order to
prevent regressions and let user customize the <select>, this patch adds
a new key to customize cssClasses in Selector bases widgets, and this
new key has the root value to avoid breaking the current implementations.

Fix #2396 #2397
bobylito added a commit that referenced this issue Oct 3, 2017
* fix(selector): root classname is applied twice
The implementation of the React `selector` was applying the root css
classname that is already applied by the headerfooter. In order to
prevent regressions and let user customize the <select>, this patch adds
a new key to customize cssClasses in Selector bases widgets, and this
new key has the root value to avoid breaking the current implementations.

Fix #2396 #2397

* chore(test): update snapshot
* chore(functional-tests): add form-control using select
The new cssClasses key so that we check that all 3 can have custom css
classes. Interestingly the key was used but not implemented already :/

* chore(test): update test to validate the usage of the new key
@bobylito
Copy link
Contributor

bobylito commented Oct 3, 2017

This should have been fixed in the 2.2 release :)

@bobylito bobylito closed this as completed Oct 3, 2017
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

No branches or pull requests

2 participants