ant-design / ant-design/pro-components

🐛[BUG] ProTable search.filterType = "light" 轻量模式下 columns.valueType = "dateRange" 点击X未设置value为空数组,导致dateRange组件出现Invalid Date

Open
#8,181 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

ProTable search.filterType = "light" 轻量模式下 columns.valueType = "dateRange" 点击X未设置value为空数组,导致dateRange组件出现Invalid Date

### 📷 复现步骤

![image](https://github.com/ant-design/pro-components/assets/18044670/ccb890f1-62c1-4c05-a84b-8d0c146b970e)

![image](https://github.com/ant-design/pro-components/assets/18044670/0e23fe7a-1efd-44d2-9245-183d545d6d4d)

直接查看官网demo即可发现存在的BUG!!
地址:[protable 轻量筛选](https://procomponents.ant.design/components/table?tab=api¤t=1&pageSize=5#packages-table-src-components-table-tab-api-demo-lightfilter )

### 🏞 期望结果

datapicker 下 Range类组件重置效果正常。

### 💻 复现代码

直接查看官网demo即可发现存在的BUG!!
地址:[protable 轻量筛选](https://procomponents.ant.design/components/table?tab=api¤t=1&pageSize=5#packages-table-src-components-table-tab-api-demo-lightfilter )

### © 版本信息

- ProComponents 版本
- "@ant-design/pro-components": "^2.6.49"
-
- umi 版本
- "@umijs/max": "^4.1.1"
-
- 浏览器环境
- Google Chrome
版本 121.0.6167.184(正式版本) (arm64)

- 开发环境
- mac OS

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the ProTable light-filter demo linked in the issue and reproduce the dateRange reset by clicking X. Trace how the light search filter handles the cleared value, then verify that resetting the range no longer produces Invalid Date in the demo.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.