Open ollyhensby opened 11 months ago
this will be possible following the next update
reviewing this again... I'm not 100% sure it is possible...
this @classmethods
init the form from schema / model:
https://github.com/maxfordham/ipyautoui/blob/3421b2eb8fdb052d2f94aaf51e50fefdd3108ce1/src/ipyautoui/watch_validate.py#L133-L168
probs need to extract them out and make a tr.observe event to super().__init__()
on change... not 100% it would work well though...
Feature Request To make it possible for an AutoUi object to update based on a new schema passed.
Expected Behaviour Create AutoUi object.
Displays this UI object.![image](https://github.com/maxfordham/ipyautoui/assets/79875276/6aa422e2-b830-4cc4-bea6-270685fce48f)
Then setting schema
Would display this on the same UI object.![image](https://github.com/maxfordham/ipyautoui/assets/79875276/99a1f9d5-113c-41dd-8dce-71314c048702)
Use Case My use case for this is when using EditGrid: the value and schema can be set in the object, which updates the DataGrid, but the AutoUi object doesn't update leading to a mismatch between the columns (or rows) shown in the DataGrid and the fields in the AutoUi object. The only way this can be done is by re-instantiating the whole EditGrid object. It would be great to have an AutoUi schema setter that updates AutoUi object.