Conversation
veronikaslc
reviewed
Dec 19, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
veronikaslc
reviewed
Dec 19, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
veronikaslc
reviewed
Dec 19, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
veronikaslc
reviewed
Dec 19, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Show resolved
Hide resolved
marta-
reviewed
Dec 22, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
marta-
reviewed
Dec 22, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
marta-
reviewed
Dec 22, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
marta-
reviewed
Dec 22, 2025
modules/data-entry/src/main/frontend/src/dataHomepage/MultiStateChip.jsx
Outdated
Show resolved
Hide resolved
marta-
reviewed
Dec 22, 2025
| } | ||
| }, [states]) | ||
|
|
||
| return <Tooltip title={states[currentStateIndex]?.tooltip}> |
Contributor
There was a problem hiding this comment.
Only render the chip if we have states. Also there will be a warning if for any reason the tooltip is missing, are we making tooltips required, should we allow them to be absent and not render the tooltip in that case (tedious!) or should we us some sort of default?
Suggested change
| return <Tooltip title={states[currentStateIndex]?.tooltip}> | |
| return states?.length > 0 && | |
| <Tooltip title={states[currentStateIndex]?.tooltip ?? "Click to change"}> |
Contributor
Author
There was a problem hiding this comment.
I'm not seeing any sort of error if tooltip gets a null or undefined title - it just silently displays nothing. I've flagged the labels as required props anyways
Add a chip that can be clicked to cycle between multiple different values and appearances
480090c to
88480ff
Compare
Code cleanup and improved error cases - Move tri state chip into seperate component file - Improve handling of cases where data is missing eg. undefined states - Improve property definition to simplify passing properties down to chip
88480ff to
48120dc
Compare
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.
Add a chip that can be clicked to cycle between multiple different values and appearances
Here's an example test snippet, I pasted it at the top of live table but putting it into any component that's easy to access should work for testing: