When Ref/RefList column shows a Choice column, render it as a choice#2277
Open
When Ref/RefList column shows a Choice column, render it as a choice#2277
Conversation
Contributor
|
Deployed commit |
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.
Context
A Reference or Reference List column may show a column from the referenced table of type Choice, but it's always rendered without color. It would be nicer to keep the styling in such cases.
Proposed solution
If the "Show Column" is of type Choice, use that Choice's styling for rendering a Reference or Reference List column.
Related issues
#1222
Has this been tested?
TBD: Tests to be created. Also, when entering a reference data, we could be showing colored choices, but the PR doesn't have this yet.
Screenshots / Screencasts
Preview with an example here: https://grist-gristlabs-grist-core-ref-to-choice.fly.dev/sbufBSzwPXTz/Restaurant-Inventory/p/8
Screenshot showing what it looks like: