Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

hide column in antd table using js / react with conditional rendering

let columns = [
  {
    title: "Name",
    dataIndex: "name",
    key: "name"
  },
  {
    title: "Age",
    dataIndex: "age",
    key: "age"
  },
  {
    title: "Address",
    dataIndex: "address",
    key: "address"
  },
  {
    title: "Action",
    key: "action",
    dataIndex: "action",
    hidden: true
  }
].filter(item => !item.hidden);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #hide #column #antd #table #js #react #conditional #rendering
ADD COMMENT
Topic
Name
4+4 =