React-table: React Table doesn't print boolean values in cells

Created on 8 Feb 2018  路  3Comments  路  Source: tannerlinsley/react-table

What version of React-Table are you using?

^6.7.6

What bug are you experiencing, or what feature are you proposing?

It seems it doesn't print boolean values. I have an array of JSON coming from an API, which has a boolean value. If i declare the column using normal 'accessor' property passing the string of the property in the JSON, it prints empty. I need to do a short arrow function in the accessor like i'm going to use a custom logic to render value, to concatenate an empty string, like this (Visible is the boolean property):

{
                                                  Header: 'Visible',
                                                  accessor:  d => d.Visible + ''
                                                }

Use https://codesandbox.io/s/X6npLXPRW (by clicking the "Fork" button) to reproduce the issue.

The sandbox never loads, it gets stuck in this part:
image

What are the steps to reproduce the issue?

  1. have an array with elements that contain one boolean property atleast
  2. render the table using normal accessor

Most helpful comment

try d.Visible.toString()

All 3 comments

try d.Visible.toString()

Just curious, why was this closed? Isn't this a bug? @gary-menzel

@davidhan527 because a suitable answer was provided by the author and the original poster had not responded for many weeks. We don't leave inactive issues open as they distract from more important issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Abdul-Hameed001 picture Abdul-Hameed001  路  3Comments

danielmariz picture danielmariz  路  3Comments

Codar97 picture Codar97  路  3Comments

kieronsutton00 picture kieronsutton00  路  3Comments

pasichnyk picture pasichnyk  路  3Comments