Skip to content

TangibleFieldsRenderer: Sections and Tabs - Switch to uncontrolled fields#39

Open
nicolas-jaussaud wants to merge 2 commits into
mainfrom
fix/field-renderer-initial-value
Open

TangibleFieldsRenderer: Sections and Tabs - Switch to uncontrolled fields#39
nicolas-jaussaud wants to merge 2 commits into
mainfrom
fix/field-renderer-initial-value

Conversation

@nicolas-jaussaud
Copy link
Copy Markdown
Contributor

Hi @zinigor!

The way accordions and tabs worked in fields was not really compatible with the way we use them in the object module

They were both expecting a value, which takes the form of a JSON object that holds the value of each sub-field

As we were not passing this initial value, all fields were blank regardless of what was previously saved

I updated the fields module and added the possibility to have an "uncontrolled" mode for both the accordion and tab fields, with that mode they should not expect a value and sub-fields will be populated

It's not directly related, but I took the opportunity to remove the permission and store callbacks, as we don't rely on fields for saving data we can safely remove them

I also simplified the enqueue logic, as we can rely on fields to enqueue its assets when something is being rendered

@nicolas-jaussaud nicolas-jaussaud requested a review from zinigor May 29, 2026 19:06
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 this pull request may close these issues.

1 participant