-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
[Autocomplete] Only activate clear button plugin when there is a placeholder option #2282
base: 2.x
Are you sure you want to change the base?
Conversation
…eholder option Placeholder is not necessarily the first option
const placeholderOptions = Array.from(this.selectElement.options) | ||
.filter((option) => option.value === ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use Array.from(...).find()
here ?
(especially as the placeholder will be first element in most of the cases)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even .some()
that will return you the boolean you need L232 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(yeah.. in the .ts file 😅 )
Form the monorepository root Install dependencies
Code style
Run Tests
Build dist packages
(you need to commit both Please ask if you want/need anymore information :) |
Status: Needs work |
Sorry guys, I somehow missed the review notifications. Will try and clear some time to dive back into this. |
No worry, we cannot criticize anyone on time things .... 😅 (well, we cannot criticize anyone on anything just to be clear 😄 ) |
Only add the
clear_button
plugin to TomSelect if the form element has no placeholder option.Notes: