Fixed the UI bug not showing already selected entries for the multi select filter#4494
Open
gabriel-bolbotina wants to merge 3 commits into
Open
Fixed the UI bug not showing already selected entries for the multi select filter#4494gabriel-bolbotina wants to merge 3 commits into
gabriel-bolbotina wants to merge 3 commits into
Conversation
Coverage Report for CI Build 26116026069Coverage decreased (-0.1%) to 57.823%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions23 previously-covered lines in 3 files lost coverage.
Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
Withalion
reviewed
May 18, 2026
Comment on lines
+114
to
+117
| selected = root.currentValue.map( v => { | ||
| const n = Number( v ) | ||
| return isFinite( n ) && String( n ) === v ? n : v | ||
| } ) |
Contributor
There was a problem hiding this comment.
Suggested change
| selected = root.currentValue.map( v => { | |
| const n = Number( v ) | |
| return isFinite( n ) && String( n ) === v ? n : v | |
| } ) | |
| selected = root.currentValue.map( v => isFinite( v ) ? Number( v ) : v ) |
Any reason why this is not enough?
Co-authored-by: Matej Bagar <matej.bagar@lutraconsulting.co.uk>
📦 Build Artifacts Ready
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solved the UI issue described in issue by converting the string values saved in currentValue to numeric ones which are used in Value Relation with AllowMulti option turned on. In this sense, the UI will show the previously selected entries from the Multi select filter.
The other bug mentioned regarding the filter itself will be solved in the QGIS plugin by modifying the template query for Value Relation with AllowMulti on to something like this:
"sql_expression": "(',' || TRIM(\"NAME_OF_FIELD\", '{}') || ',' ) LIKE '%,' || @@value@@ || ',%'"(detailed here)Once the template query is modified, the existing business logic in the code already handles this type of filtering with "OR" option.