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

InputView: attach property array to parent property set only on deman #3011

Open
ashklianko opened this issue Feb 15, 2023 · 0 comments
Open
Assignees
Labels
Refactoring Code improvements

Comments

@ashklianko
Copy link
Member

Problem:
When InputView is executing layout/update it always creates PropertyArray if it doesn't exist, and then immediately attaches it to the parent property set. This immedialtely makes 'layouted' property set differ from persisted one and requires extra efforts to calculate if data has really changed or not.

Solution:

  1. If property array for InputView is missing in the parent property set then create it but don't attach to parent
  2. When data in this newly created property array added/modified then attach it to the parent prop set
  3. When new property array has no data then detach it. When existing non empty prop array becomes empty also detach it so it is removed on save

Potential issues to deal with:
-order of arrays in the parent's prop set
-default values in arrays

@ashklianko ashklianko added the Refactoring Code improvements label Feb 15, 2023
@ashklianko ashklianko self-assigned this Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Code improvements
Projects
None yet
Development

No branches or pull requests

1 participant