Skip to content
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

feat: add keepFilter option (#7063) (CP: 23.4) #7085

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

sissbruecker
Copy link
Contributor

Cherry-pick of #7063

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

// Restore input to the filter value. Needed when items are
// navigated with keyboard, which overrides the input value
// with the item label.
this.inputElement.value = this.filter;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the single occurence of this._inputElementValue with this.inputElement.value.

@@ -110,6 +118,14 @@ describe('selecting items', () => {
comboBox.clear();
expect(comboBox.selectedItems).to.deep.equal([]);
});

it('should keep the filter and input value when committing an invalid option', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the test from #7072 and updated the test in the keep filter suite to also verify that the filter is not reset.

@sissbruecker sissbruecker merged commit f7af2fd into 23.4 Jan 15, 2024
10 checks passed
@sissbruecker sissbruecker deleted the feat/mscb-keep-filter-23.4 branch January 15, 2024 08:48
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.4.0.alpha2 and is also targeting the upcoming stable 23.4.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants