ant-design/ant-design

Table column's "responsive" array does not work with multiple breakpoints

Open

#27,525 opened on 2020年11月3日

GitHub で見る
 (7 comments) (4 reactions) (0 assignees)TypeScript (98,031 stars) (54,612 forks)batch import
Inactivehelp wanted

説明

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Pass in "responsive: ['sm', 'md']" to a table column. Resize browser to the next breakpoint up (lg: 992px). The column will still be visible.

What is expected?

Since the "md" breakpoint goes from 768px to the "lg" 992px breakpoint, I would expect column to disappear after 992px.

What is actually happening?

Column is still visible. [sm, md] is equivalent to [sm] right now.

Environment Info
antd 4.8.0
React 17.0.1
System any
Browser Chrome 84

This could be viewed as a feature request instead. But the english documentation says responsive is "The list of breakpoints at which to display this column." If responsive property is an array, why does it ignore a range of breakpoints? [sm, md] should not be the same as [sm].

コントリビューターガイド

Table column's "responsive" array does not work with multiple breakpoints · ant-design/ant-design#27525 | Good First Issue