table icon indicating copy to clipboard operation
table copied to clipboard

Does not display boolean values

Open guyisra opened this issue 8 years ago • 5 comments

if the data, via the accessor, return a boolean value, they are not displayed in the table.

Is this a known issue, or should I use some option to convert them to string?

guyisra avatar Jan 15 '18 13:01 guyisra

The main purpose of the accessor is to provide values for correct sorting and filtering comparisons and should return raw data (like a boolean). An attempt is made to convert that into something that can be displayed. However, the correct way to display non-string or non-numeric data is to use a Cell handler and convert your data there.

gary-menzel avatar Jan 15 '18 19:01 gary-menzel

This seems to happen with string values of "False" and "'False'" as well - these are not raw booleans. Is this expected behavior? They are already a string - do I need to use a Cell handler to cast them to a string again?

(Ignore, not a react-table issue, sorry for the static...)

Omortis avatar Mar 20 '18 14:03 Omortis

This seems to happen with string values of "False" and "'False'" as well - these are not raw booleans. Is this expected behavior? They are already a string - do I need to use a Cell handler to cast them to a string again?

(Ignore, not a react-table issue, sorry for the static...)

How you target that problem ?

Waqar-Ul-Khaf avatar Oct 16 '18 13:10 Waqar-Ul-Khaf

You can do value.toString() to display boolean values in data table.

anantl05 avatar Apr 21 '20 13:04 anantl05

The main purpose of the accessor is to provide values for correct sorting and filtering comparisons and should return raw data (like a boolean). An attempt is made to convert that into something that can be displayed. However, the correct way to display non-string or non-numeric data is to use a Cell handler and convert your data there.

Is there a supporting example?

debosmit-git avatar May 03 '20 15:05 debosmit-git