-
Notifications
You must be signed in to change notification settings - Fork 592
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
Dynamic placeholders for Multi-select no longer working in 9.x #779
Comments
I am also hitting this bug |
Hey - so I actually removed this functionality in the 9.0.0 release (#731) but have clearly forgotten to update the documentation 🤦♂For versions >=9.x, |
This can be done by just adding a "placeholder" attribute on the input element that is part of the multi-select. This would normally be done via configurations, but the issue the current branch has it is does not default to the placeholder configurations if the select element does not have a "default" select option. The following pull request fixes this issue with minimal changes. |
@jshjohnson then what is the current way to add a placeholder to multiselect? |
Unfortunately, we just had to duck punch it. |
@travist thanks. I've ended with dumb'n'brute solution (using Preact): useEffect(() => {
const choices = new Choices(selectRef.current, options as IChoices.Options);
if (restProps.multiple && choices.config.placeholderValue) {
((choices as any).input as HTMLInputElement).placeholder = choices.config.placeholderValue;
}
}, []); |
Describe the bug
In all versions <= 8.0.0, placeholders would show up for multiple select dropdown configurations. This is no longer working in the 9.x branch.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You should see the placeholder.
Screenshots
Will provide if necessary but this is pretty easy to reproduce.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: