-
Notifications
You must be signed in to change notification settings - Fork 87
refactor!: update MSCB to not use combo-box extension internally #9804
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
Conversation
3e769af to
271f88c
Compare
| id="clearButton" | ||
| part="clear-button" | ||
| slot="suffix" | ||
| @touchend="${this._onClearButtonTouchend}" |
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.
This was added in #4141. It should't be needed anymore as _onClearAction() will call clear() and that method will be used from the combo-box base mixin. I will keep the test checking that items are cleared on touchend though.
271f88c to
b4c595f
Compare
| expect(comboBox.selectedItems).to.deep.equal([]); | ||
| }); | ||
|
|
||
| it('should not clear selected items on Esc when clear button is visible and opened', async () => { |
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.
This is a new test that covers current behavior on main branch. I updated _onEscape accordingly - previously it was working differently. Now we call super._onEscape in MSCB so I needed to adjust the logic.
b4c595f to
5d4979d
Compare
| } | ||
| :host([opened]) { | ||
| pointer-events: auto; |
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.
Base styles for MSCB already have this as they extend combo-box base styles.
6c24a14 to
46f2f42
Compare
42c27a7 to
b4314b4
Compare
b4314b4 to
1effecb
Compare
| expect(inputElement.value).to.equal(''); | ||
| }); | ||
|
|
||
| it('should clear the filter when pressing escape with autoOpenDisabled', async () => { |
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.
Added a missing test that covers current behavior on main branch.
| it('should clear selected items on clear button touchend', () => { | ||
| comboBox.selectedItems = ['apple', 'orange']; | ||
| clearButton.dispatchEvent(new CustomEvent('touchend', { cancelable: true })); | ||
| fire(clearButton, 'touchend'); |
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.
Changed to use fire() which makes event bubble, as the combo-box listener is on the host element.
|
|
This ticket/PR has been released with Vaadin 25.0.0-beta2. |



Description
Fixes #9719
Depends on #9805
The base visual tests change is valid: the
input-fieldpart is now a flex child (previously, that wasn't working for MSCB because of an extravaadin-multi-select-combo-box-internalwrapper - ideally it would needdisplay: contents).I'm not sure if we need that visual test as the original fix #6721 was Lumo specific, but I'm ok to keep it.
Type of change
Note
Flow components branch: https://github.com/vaadin/flow-components/compare/proto/mscb-combo-box-mixins