Skip to content

DataForm: Consolidate render function argument #66616

@gigitux

Description

@gigitux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Package] DataViews/packages/dataviews

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions