Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

Use metaData and formData #5

Open
polmiro opened this issue Aug 29, 2014 · 2 comments
Open

Use metaData and formData #5

polmiro opened this issue Aug 29, 2014 · 2 comments

Comments

@polmiro
Copy link
Contributor

polmiro commented Aug 29, 2014

Sometimes we use the formData to transfer information thorough the form structure that is not actually relevant. Some examples would be:

  • Typeahed uses "field_name_typehead" when the id transfered is not the same as the title displayed.
  • DynamicForm uses "field_name_form_def".

I think it would be ideal to have a metaData data object that is transferred to the input elements, this can be updated by DataSourcedMixin, and then other form elements can react to those changes.

@polmiro
Copy link
Contributor Author

polmiro commented Sep 8, 2014

This is related to making the form components immutable. All they would do is propagate a pair(metadataKey, value) to the parent component

@polmiro
Copy link
Contributor Author

polmiro commented Sep 8, 2014

Metadata should also be used in DataSourcedMixin.

Instead of storing "options" and other sourced data as state, we should propagate it to the parent component (as we do with formData).

I'm still not certain where the data resolution should be done. Whether pass "formData" + "dataKey" down the line or just pass the "data" itself. (same thing regarding metadata).

chollier added a commit that referenced this issue Sep 8, 2014
That page will need some love and a more thorough explanation. However it might change because of #5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant