How to show and hide some columns on React Table?

前端 未结 1 438
南笙
南笙 2021-01-08 00:24

I have created a React Table. I want to hide or show some columns in my table by user action. By default all columns should be visible but we will have some check boxes to h

相关标签:
1条回答
  • 2021-01-08 00:24

    In column there is a property show.
    show: true, // can be used to hide a column.
    Make it false to hide the particular column. Keep user's check-box values in the state. https://react-table.js.org/#/story/readme

    Note: The column property showis deprecated. Use initialstate.hiddenColumns instead.

    Check: https://github.com/tannerlinsley/react-table/issues/1804

    0 讨论(0)
提交回复
热议问题