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

Propagating live updates #26

Open
luigicesena opened this issue May 30, 2019 · 1 comment
Open

Propagating live updates #26

luigicesena opened this issue May 30, 2019 · 1 comment

Comments

@luigicesena
Copy link

luigicesena commented May 30, 2019

Hello, I opened this new one to not go off-topic on the other post. I was trying the live demo updates, and it's working, my list of items is updated every 2 seconds. But I noticed that the updated data is not propagated inside the Update item form, I bounced back and forth between functions but I'm not sure what to do. The problem is that my items are updated every 2 seconds, but when I open the Update form to update an item, I want the form input values to update every 2 seconds too. What would you suggest? I don't want to mess the code badly

@mazdik
Copy link
Owner

mazdik commented May 31, 2019

when you open the edit form window:

  updateAction(row: Row) {
    this.dataManager.item = row;
    this.modalEditForm.isNewItem = false;
    this.modalEditForm.detailView = false;
    this.modalEditForm.open();
  }

you can try something like:

this.dataManager.item = null;
this.dataManager.item = selectedNewRow...;

I do not recommend updating the form as often. You can create your custom component (wrapper with override, inheritance)

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

No branches or pull requests

2 participants