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
I am using on-change to watch changes in the state of my application.
Until now, I was using the default configuration. With this, when I listen to a change in my list, if I add a new element in my list, the path I get in the onChange method if the array itself.
For example:
And when I do this.state.selectedFeatures.push(...features), then the path in the onChange method is selectedFeatures.
Now, I add some problems with some functions like forEach(), which were not triggering all the events, but only one event at the end of the loop. So I've tried to activated the details:true options, as documented. This worked well, except that now the path has changed when I add elements in my list.
And when I do this.state.selectedFeatures.push(...features), then the path in the onChange method is now selectedFeatures.0.
I don't really understand the philosophy here. Is it intentional? Is it a bug?
(I could perhaps try to sove it by myself in a Pull-Request, but I would be happy to discuss this before.)
Thanks.
The text was updated successfully, but these errors were encountered:
Hello,
I am using on-change to watch changes in the state of my application.
Until now, I was using the default configuration. With this, when I listen to a change in my list, if I add a new element in my list, the path I get in the onChange method if the array itself.
For example:
And when I do
this.state.selectedFeatures.push(...features)
, then the path in the onChange method isselectedFeatures
.Now, I add some problems with some functions like
forEach()
, which were not triggering all the events, but only one event at the end of the loop. So I've tried to activated thedetails:true
options, as documented. This worked well, except that now the path has changed when I add elements in my list.For example, now I have:
And when I do
this.state.selectedFeatures.push(...features)
, then the path in the onChange method is nowselectedFeatures.0
.I don't really understand the philosophy here. Is it intentional? Is it a bug?
(I could perhaps try to sove it by myself in a Pull-Request, but I would be happy to discuss this before.)
Thanks.
The text was updated successfully, but these errors were encountered: