Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boolean from response server not visible in table ant

Tags:

react-native

I use https://ant.design/components/table/ for react-native project.

I have fetch and all data works except boolead value!

Any suggestion?

  const columns = [
    {
      title: 'Test',
      dataIndex: 'testbool',
      key: 'testbool',
      width: '20%',
    }, ...

like image 353
Nikola Lukic Avatar asked Nov 16 '25 23:11

Nikola Lukic


1 Answers

after viewing your code you can try this:

const columns = [{
      title: 'Test',
      dataIndex: 'testbool',
      key: 'testbool',
      width: '20%',
      render : (text) => String(text),
    }, ...

this works in my code for accessing the boolean value. Hope it works in yours as well.

like image 197
Divyanshi tripathi Avatar answered Nov 18 '25 21:11

Divyanshi tripathi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!