Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

fix(core-suggest): adjust filter case to allow to filter for empty string #749

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

skjalgepalg
Copy link
Collaborator

This PR fixes built-in filtering of static content in core-suggest

Previously, when clearing the input to empty value '', this would parse as falsy and no reset/re-filtering would take place. By changing the case to self.input.value != null we maintian filtering for null or undefined but allow for filtering using other falsy values like '', 0, NaN.

Note that being an input, the value will be cast to a string, and so the effective change will only be to allow for filtering by empty string. e.g. NaN would actually be 'NaN' and as such a perfectly valid string to filter by.

Resolves #748

@skjalgepalg skjalgepalg merged commit dcd1855 into master Oct 26, 2023
1 check passed
@skjalgepalg skjalgepalg deleted the suggest-filter-reset branch October 26, 2023 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest fortsetter å filtrere dropdownliste selv om inputfeltet tømmes
4 participants