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

DataForm: Consolidate render function argument #66616

Open
gigitux opened this issue Oct 30, 2024 · 0 comments
Open

DataForm: Consolidate render function argument #66616

gigitux opened this issue Oct 30, 2024 · 0 comments
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews

Comments

@gigitux
Copy link
Contributor

gigitux commented Oct 30, 2024

Reviewing #66559, @oandregal noticed that the Edit function receives different arguments than the View function. We need to consolidate the arguments for both functions.

I just looked this up and it's confusing why the Edit function receives data (Item), field, onChange, hideLabelFromVision but the View function only receives the item (Item). There's also different names (data vs item) for the same prop across functions. I think we need to consolidate and:

The data prop should be called item in both places.
The field should be passed down as a prop in both places.

@oandregal comment

@gigitux gigitux added [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews
Projects
None yet
Development

No branches or pull requests

1 participant