-
Notifications
You must be signed in to change notification settings - Fork 80
feat(combobox): make combobox clearable #6972
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
Changes from 8 commits
6b09704
a220970
57bc748
203f076
6718916
2c4b335
d453a83
10c7c50
4209421
c9d37de
a5a0512
ea4045c
e6dc7f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,11 +127,14 @@ export class ComboboxItem implements ConditionalSlotComponent, InteractiveCompon | |
// | ||
// -------------------------------------------------------------------------- | ||
|
||
toggleSelected(coerce?: boolean): Promise<void> { | ||
if (this.disabled) { | ||
toggleSelected(): Promise<void> { | ||
const isSingleSelect = getElementProp(this.el, "selection-mode", "multiple") === "single"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a note that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I remember. I'll submit a PR to rename it today, so it's not misleading when reading code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. related to #6038 |
||
|
||
if (this.disabled || (isSingleSelect && this.selected)) { | ||
return; | ||
} | ||
this.selected = typeof coerce === "boolean" ? coerce : !this.selected; | ||
|
||
this.selected = !this.selected; | ||
} | ||
|
||
itemClickHandler = (event: MouseEvent): void => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"clear": "Clear value", | ||
"removeTag": "Remove tag" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"clear": "Clear value", | ||
"removeTag": "Remove tag" | ||
} |
Uh oh!
There was an error while loading. Please reload this page.