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

[Form] ArrayField组件的add方法希望可以传入索引 #2544

Open
popdo opened this issue Oct 26, 2024 · 0 comments
Open

[Form] ArrayField组件的add方法希望可以传入索引 #2544

popdo opened this issue Oct 26, 2024 · 0 comments
Labels
feature request Request new feature PR Welcome Welcome pull request :)

Comments

@popdo
Copy link

popdo commented Oct 26, 2024

Which Component Need Enhancement 期望新增功能的组件

  • Form

What does the proposed API look like 期望支持的API

希望ArrayField的add方法支持传入索引值

Feature Description 功能描述

<ArrayField field='ApiList' initValue={inputs.ApiList}>
   {({ add, arrayFields, addWithInitValue }) => (
       // ...
   )}
</ArrayField>

目前这里的add方法始终只能在底部插入新行,希望能支持在任意索引的下方使用add(index)插入,这样一旦数组顺序有变可以很容易的进行调整,而不需要自己额外去实现拖拽排序等功能。

Additional information 补充说明

@popdo popdo added the feature request Request new feature label Oct 26, 2024
@pointhalo pointhalo added the PR Welcome Welcome pull request :) label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new feature PR Welcome Welcome pull request :)
Projects
None yet
Development

No branches or pull requests

2 participants