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

Field[type="array"]在数组长度等于maxItems时仍允许添加 #555

Closed
kpaxqin opened this issue Dec 27, 2019 · 0 comments · Fixed by #556
Closed

Field[type="array"]在数组长度等于maxItems时仍允许添加 #555

kpaxqin opened this issue Dec 27, 2019 · 0 comments · Fixed by #556

Comments

@kpaxqin
Copy link
Contributor

kpaxqin commented Dec 27, 2019

Help us to manage our issues by answering the following:

  1. How would you tag this issue?
  • Bug
  1. Describe your issue:

删除的逻辑是 > minItems即允许,等于时不允许

但添加的逻辑是 <=maxItems时允许,等于时也允许添加,但添加后报错,且不再允许添加

删除和添加的逻辑不一致。如果超过maxItems一定是错误的,则应该阻止用户进行此操作。

在v0.4中也是添加按钮可见但无效。

  1. If your issue is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via Bug Report Template on CodeSandbox
    .

see code: https://github.com/alibaba/uform/blob/bd63a915db7c9e5b0afd545323b1c3c9abb9682d/packages/react-shared-components/src/hooks/useArrayList.tsx#L47

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 a pull request may close this issue.

1 participant