-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table: Fixes issues with phantom extra 0 for zero values #29165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@@ -49,7 +49,7 @@ export const DefaultCell: FC<TableCellProps> = props => { | |||
{value} | |||
</a> | |||
)} | |||
{showFilters && cell.value && <FilterActions {...props} />} | |||
{showFilters && cell.value !== undefined && <FilterActions {...props} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I read somewhere about React best practices that we should try to use ternaries instead.
{showFilters && cell.value !== undefined && <FilterActions {...props} />} | |
{showFilters && cell.value ? <FilterActions {...props} /> : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will display 'false' as text if the condition is false, should be:
{showFilters && cell.value !== undefined ? <FilterActions {...props} /> : null}
(cherry picked from commit f28ba27)
This was a really poor title for changelog, explains not the user impact of the bugfix (phantom zeros for zero values). Need to remember PR titles matter :) |
Fixes #29108