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(Forms): add autoPushWhen property to Iterate.PushContainer #3876

Closed
wants to merge 4 commits into from

Conversation

tujoworker
Copy link
Member

@tujoworker tujoworker commented Aug 28, 2024

This is an addition to #3843

Quick example usage:

<Iterate.Array path="/countries">
  <MyViewItem />
  <MyEditItem /> // Contains <Field.SelectCountry />
</Iterate.Array>

<Iterate.PushContainer
  path="/countries"
  autoPushWhen={(list) => list.length === 0} // define if and when it should push
>
  <MyEditItem />
</Iterate.PushContainer>

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 8:53am

@tujoworker tujoworker requested a review from langz August 28, 2024 08:34
Copy link
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

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

👏

Should the property name be autoPushWhen or pushWhen?
Does the word auto(automatically) add any meaning?

I don't have any strong opinions here, just wanted to give it a thought.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@tujoworker
Copy link
Member Author

Closing this in favor of #3877

@tujoworker tujoworker closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants