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

Ensure that ReplacementPane does not modify user objects #967

Merged
merged 3 commits into from
Jan 20, 2020

Conversation

philippjfr
Copy link
Member

Some of our "reactive" APIs like interact or depends use an internal optimization which tries to avoid replacing models entirely instead reusing them so they can be updated. The problem with that is that if a user supplies an object it will be reused in itself is problematic but also causes issues when that object is later reused (because no change will be detected). Therefore we have to be more careful about this optimization, the two cases we can use the optimization therefore are:

  1. The object was created internally, i.e. the user has to reference to the object and therefore will never reuse it.
  2. We can safely make a clone of the object (i.e. there are no custom watchers or links installed on the object)

Fixes #838
Fixes #853

@philippjfr philippjfr force-pushed the replacement_pane_clone branch from bd0045b to afdbaac Compare January 19, 2020 23:39
@philippjfr philippjfr force-pushed the replacement_pane_clone branch from dc41ed0 to 22ed93b Compare January 20, 2020 00:16
@philippjfr philippjfr merged commit 863293f into master Jan 20, 2020
@philippjfr philippjfr deleted the replacement_pane_clone branch January 23, 2020 02:00
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.

Bug with depends changing the Select widget options Cannot dynamically add and remove panes
1 participant