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

[bug]: createNewViewModelOnInsert Does not Create a new View model when widget is being re inserted in the tree #1073

Open
meetdagm opened this issue Dec 27, 2023 · 1 comment
Labels
reproduce issues in the process of trying to reproduce the issue

Comments

@meetdagm
Copy link

Describe the bug

  1. I have a parent widget that is notified by it's view model.
  2. When the parent is notified to rebuild the widget tree it build a child widget that has it's own viewModel
  3. This child widget's constructor and build methods are being called but the view model builder is not being triggered.

How is this even possible???????

To reproduce

  1. Create a parent widget with it's own viewmodel
  2. trigger a UI rebuild from the viewmodel using notifyListeners()
  3. Create a child widget that uses a value that's being updated from the parent view model
  4. When this child widget get's rebuild on notify Listeners, the child widget will get re-built but the value in the child widget's viewmodel is still using the old value that it got during the initial build from the parent

Expected behavior

No response

Screenshots

No response

Additional Context

No response

@ferrarafer ferrarafer added the reproduce issues in the process of trying to reproduce the issue label Jan 8, 2024
@FilledStacks
Copy link
Contributor

Interesting, can you please make a small example using the stacked_cli to generate the app.

This will allow us to reproduce and see what you need and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproduce issues in the process of trying to reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants