Choices
Choices copied to clipboard
Added multi class functionality
Description
This PR attempts to implement allowing multi-class configs for all elements across the board.
classNames: {
containerOuter: 'choices',
containerInner: 'choices__inner class2 class3', //this works for any of these className options
input: 'choices__input',
inputCloned: 'choices__input--cloned',
list: 'choices__list',
listItems: 'choices__list--multiple',
listSingle: 'choices__list--single',
listDropdown: 'choices__list--dropdown',
item: 'choices__item',
itemSelectable: 'choices__item--selectable',
itemDisabled: 'choices__item--disabled',
itemChoice: 'choices__item--choice',
placeholder: 'choices__placeholder',
group: 'choices__group',
groupHeading: 'choices__heading',
button: 'choices__button',
activeState: 'is-active',
focusState: 'is-focused',
openState: 'is-open',
disabledState: 'is-disabled',
highlightedState: 'is-highlighted',
selectedState: 'is-selected',
flippedState: 'is-flipped',
loadingState: 'is-loading',
noResults: 'has-no-results',
noChoices: 'has-no-choices'
},
Types of changes
- [ ] Chore (tooling change or documentation change)
- [ ] Refactor (non-breaking change which maintains existing functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [X] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
@mikebronner I opened a PR to solve this issue 2month ago. #889. But this lib doesn't seem to be maintained anymore.
HI @Matth10, yea I saw that :) I updated additional code that your PR didn't cover. :) But I have moved on as well, I could not get this package to work well with tailwind at all, because it relies on nested CSS class rules for formatting. I ended up building my drop-down from scratch.
But I have moved on as well, I could not get this package to work well with tailwind at all, because it relies on nested CSS class rules for formatting. I ended up building my drop-down from scratch.
Yes this is exactly our cases. And I think I will also end up building my own one too.
@Matth10 @mikebronner what did you guys end up with?
@ju5t I needed up writing my own from scratch.
This would be great functionality to add. If you are still interested in getting this merged, I think it makes more sense to require multiple classes be provided as an array instead of doing all the string splitting internally.
If you aren't interested in making the change anymore just let us know.
@mtriff Sorry, we have moved on at this point. If you would like to continue working on this PR and refining it, that would be great.
hi @mtriff ,
I just made the PR #1074 to finalize this feature. Tell me if you need some changes.
regards