mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
fix(explore): make to convert null to N/A in view results (#19316)
* fix(explore): make to convert null to N/A in view results * fix(explore): make to null formatter move before timeFormatter
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
BOOL_FALSE_DISPLAY,
|
||||
BOOL_TRUE_DISPLAY,
|
||||
SLOW_DEBOUNCE,
|
||||
NULL_DISPLAY,
|
||||
} from 'src/constants';
|
||||
import { Radio } from 'src/components/Radio';
|
||||
import Icons from 'src/components/Icons';
|
||||
@@ -49,6 +50,10 @@ import {
|
||||
unsetTimeFormattedColumn,
|
||||
} from 'src/explore/actions/exploreActions';
|
||||
|
||||
export const CellNull = styled('span')`
|
||||
color: ${({ theme }) => theme.colors.grayscale.light1};
|
||||
`;
|
||||
|
||||
export const CopyButton = styled(Button)`
|
||||
font-size: ${({ theme }) => theme.typography.sizes.s}px;
|
||||
|
||||
@@ -303,6 +308,9 @@ export const useTableColumns = (
|
||||
if (value === false) {
|
||||
return BOOL_FALSE_DISPLAY;
|
||||
}
|
||||
if (value === null) {
|
||||
return <CellNull>{NULL_DISPLAY}</CellNull>;
|
||||
}
|
||||
if (timeFormattedColumnIndex > -1) {
|
||||
return timeFormatter(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user