ant-design / ant-design/pro-components

🧐[问题] Suppress `onFinish` Trigger on Value Change in LightFilter

Open
#8,377 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🧐 问题描述

In the LightFilter component, the `onFinish` method is being triggered every time a value changes. I am looking for a way to suppress this behavior as we might be adding a separate submit button.

### 💻 示例代码

This issue can be reproduced in the following demo:
[Lightweight Filtering Demo](https://procomponents.ant.design/en-US/components/query-filter#lightweight-filtering)

### 🚑 其他信息

It appears that the submit action is directly invoked in the code here:
[LightFilter index.tsx - Line 304](https://github.com/ant-design/pro-components/blame/master/packages/form/src/layouts/LightFilter/index.tsx#L304)

Contributor guide

Open the contributing guide

Research direction

Start with packages/form/src/layouts/LightFilter/index.tsx around line 304 and reproduce the behavior in the Lightweight Filtering Demo. Trace how value changes invoke onFinish and determine the intended control for separating submission from changes. Done means the component no longer submits on every value change while the existing filtering and submission behavior remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
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.