Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pro:search): add validate function #1056

Merged

Conversation

sallerli1
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

不支持搜索项校验

What is the new behavior?

增加搜索项校验功能

Other information

@idux-bot
Copy link

idux-bot bot commented Aug 3, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #1056 (c8774b6) into main (dc40ed9) will decrease coverage by 0.02%.
The diff coverage is 68.96%.

@@            Coverage Diff             @@
##             main    #1056      +/-   ##
==========================================
- Coverage   93.64%   93.62%   -0.03%     
==========================================
  Files         314      314              
  Lines       30220    30239      +19     
  Branches     3547     3547              
==========================================
+ Hits        28299    28310      +11     
- Misses       1921     1929       +8     
Impacted Files Coverage Δ
packages/pro/search/src/ProSearch.tsx 17.01% <10.00%> (-0.29%) ⬇️
packages/pro/search/src/types.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sallerli1 sallerli1 changed the title feat(pro:search): add validate function [WIP]feat(pro:search): add validate function Aug 3, 2022
@sallerli1 sallerli1 force-pushed the feat-pro-search-invalid-input-saller branch from cb77681 to 774bc4e Compare August 5, 2022 02:35
@sallerli1 sallerli1 changed the title [WIP]feat(pro:search): add validate function feat(pro:search): add validate function Aug 5, 2022
@@ -64,6 +66,7 @@ interface InvalidSearchValue<V = unknown> extends Partial<SearchValue<V>> {
| `defaultOperator` | 默认的操作符 | `string` | - | - | 提供时,会自动填入默认的操作符 |
| `defaultValue` | 默认值 | - | - | - | 提供时,会自动填入默认值 |
| `inputClassName` | 输入框class | `string` | - | - | 用于自定义输入框样式 |
| `validate` | 搜索项校验函数 | `(value: SearchValue) => { message?: string } | undefined` | - | - | 返回错误信息 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `validate` | 搜索项校验函数 | `(value: SearchValue) => { message?: string } | undefined` | - | - | 返回错误信息 |
| `validator` | 搜索项校验函数 | `(value: SearchValue) => { message?: string } | undefined` | - | - | 返回错误信息 |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都改成 validator 吧

@sallerli1 sallerli1 force-pushed the feat-pro-search-invalid-input-saller branch from 774bc4e to 8cb2506 Compare August 6, 2022 04:25
@sallerli1 sallerli1 force-pushed the feat-pro-search-invalid-input-saller branch from 8cb2506 to c8774b6 Compare August 6, 2022 07:42
@danranVm danranVm merged commit 79c2d09 into IDuxFE:main Aug 8, 2022
@sallerli1 sallerli1 deleted the feat-pro-search-invalid-input-saller branch February 20, 2023 06:11
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.

None yet

2 participants