Skip to content

Conversation

anothertempore
Copy link
Contributor

Remove falsy value in columns, so that we can do expression in the column arrays. For example:

let showId = false

const columns = [
  {
    title: 'Name',
    dataIndex: 'name',
    key: 'name'
  },
  showId && {
    title: 'ID',
    dataIndex: 'id',
    key: 'id'
  }
]

@vercel
Copy link

vercel bot commented Aug 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/table/b975diy3s
✅ Preview: https://table-git-fork-kexin-li-master.react-component.vercel.app

@codecov
Copy link

codecov bot commented Aug 14, 2020

Codecov Report

Merging #515 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #515   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files          25       25           
  Lines         764      764           
  Branches      220      220           
=======================================
  Hits          763      763           
  Misses          1        1           
Impacted Files Coverage Δ
src/Header/Header.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b91baaf...ed7d868. Read the comment docs.

@afc163 afc163 merged commit c9cd4f8 into react-component:master Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants