Fix: Properly display removed options in selection columns#2450
Open
Koc wants to merge 1 commit into
Open
Conversation
22960ea to
d7f542a
Compare
d7f542a to
0d781c4
Compare
Contributor
|
Related to #727 |
enjeck
reviewed
Apr 11, 2026
enjeck
left a comment
Contributor
There was a problem hiding this comment.
If deleting an option is supposed to actually remove that value from rows, then the best UX in my opinion is to reflect that cleanup directly: remaining selections stay visible, deleted ones disappear. I don't like keeping a ghost value around.
0d781c4 to
4aa1855
Compare
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
4aa1855 to
65afdf2
Compare
enjeck
reviewed
Jun 27, 2026
| <div class="cell-selection"> | ||
| <div v-if="!isEditing" class="non-edit-mode" @click="handleStartEditing"> | ||
| {{ column.getLabel(value) }}<span v-if="isDeleted()" :title="t('tables', 'This option is outdated.')"> ⚠️</span> | ||
| <template v-if="selectedOption.deleted"> |
Contributor
There was a problem hiding this comment.
this throws an error if you:
- Open a table that has rows.
- Add a new single-selection column with no default value (or just leave any existing single-select cell empty).
- View the table in grid mode.
TypeError: Cannot read properties of null (reading 'deleted')
at VueComponent.render50 (TableCellSelection.vue:158:1)
Easy fix could be:
Suggested change
| <template v-if="selectedOption.deleted"> | |
| <template v-if="selectedOption?.deleted"> |
Comment on lines
22
to
+23
| getLabel(id) { | ||
| const i = this.selectionOptions?.findIndex((obj) => obj.id === id) | ||
| return this.selectionOptions[i]?.label | ||
| return this.getOptionObject(id)?.label |
Contributor
There was a problem hiding this comment.
getLabel now returns String(id) instead of undefined for orphaned values, which changes filter behavior in isFilterFound. i suppose that for example, IsEmpty there will now treat a row holding a deleted option as non-empty? Same for Contains, BeginsWith etc
Is this intentional behavior?
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.
Reproducer
Expected result
We should see yellow triangle with exclamation mark that informs us about non-existent optipns
🖼️ Screenshoots