Closed trueqbit closed 7 years ago
I'm marking this as a feature request for after V1.1. But I may not implement it even then, since there are workarounds (the generic "**" path, or using observeAll) which address the scenario, and it may well be that implementing it would be too expensive in code-complexity, and may negatively impact performance in simpler scenarios.
The problem is that if you have an items
array and you create a dependency path [1].foo
, for example, then internally JsViews will add a listener for changes in the "foo" property of the items[1]
object. Now, if you observably remove item[0]
, JsViews has to remove that listener and add a corresponding listener to the new item[1]
- if there is one. Or if not, later, if you add a new item to the array (now item[1]
) it has to add a listener to that object. So it gets messy...
Hi Boris,
I don't know how much of a need there is for such a feature, especially because it can be dealt with observing all properties. But I ran into this scenario and specifying an observing path to specific array elements would lower change tracking:
I have a data array with always at least one element. Certain parts of the UI always display/store back information from/to the first element. In my case it's an interval specification, where multiple interval points are equalized in regards to their time of day. So I'd like to express: