You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my view I have a table displaying users from a users array, which is binded to data.bind: users; display-data.bind: $displayData; like this. It all works fine. On this page, I also have a modal to add a new user. The new user gets added to the users array and to a local json server (for now). If I then try to do revealItem on this added user, the functions returns false. What do I need to do for the plugin to see this change in data?
The text was updated successfully, but these errors were encountered:
I believe I know what is going on. If you add the element and immediately ask to reveal it, the reveal method will not find the element in the list, it is a timing issue.
I have started some work to internally use promises to avoid this kind of issues, but it is not ready yet.
On the meantime, you can wait a little bit after adding the new item to call the function to reveal the item. I know it is not pretty, but it should get the job done.
Putting it in a timeout did the trick indeed, it works now. Looking forward to the promises for a cleaner solution. Thanks for the quick reply! Good job on the plugin.
In my view I have a table displaying users from a users array, which is binded to data.bind: users; display-data.bind: $displayData; like this. It all works fine. On this page, I also have a modal to add a new user. The new user gets added to the users array and to a local json server (for now). If I then try to do revealItem on this added user, the functions returns false. What do I need to do for the plugin to see this change in data?
The text was updated successfully, but these errors were encountered: