Is your feature request related to a problem? Please describe.
Currently, when a Neo.state.Provider holds a Neo.data.Record instance in its data config, changes to individual properties within that record (e.g., record.set('firstName', 'NewName')) do not automatically trigger updates through the StateProvider's binding system. Developers must manually proxy these changes by listening to record-level events (if they existed) and updating a separate data property in the StateProvider. This creates boilerplate and hinders seamless reactive binding to nested record properties.
Describe the solution you'd like
Enhance Neo.state.Provider to automatically detect Neo.data.Record instances within its data config and subscribe to their granular change notifications (assuming Neo.data.Record is enhanced to provide such notifications, as per a separate feature request). When a record's property changes, the StateProvider should propagate this change through its binding system, allowing components to directly bind to nested record properties using a syntax like bind: { text: 'data.currentUser.firstName' }.
This would involve:
- Detecting
Neo.data.Record instances when they are assigned to StateProvider's data properties.
- Subscribing to the record's granular change events (e.g.,
fieldChange or similar, once implemented in Neo.data.Record).
- Translating these record-level changes into
StateProvider-level onDataPropertyChange notifications for the specific nested path (e.g., data.myRecord.fieldName).
Describe alternatives you've considered
The current alternative is to manually listen for changes on the record (if a mechanism existed) and then explicitly call stateProvider.setData() for the relevant property. This is verbose and defeats the purpose of a streamlined binding system.
Additional context
This feature is dependent on the implementation of granular change notifications within Neo.data.Record. It would significantly improve the developer experience for data-intensive applications, making it much easier to build reactive UIs that respond directly to changes in individual record fields.
Is your feature request related to a problem? Please describe. Currently, when a
Neo.state.Providerholds aNeo.data.Recordinstance in itsdataconfig, changes to individual properties within that record (e.g.,record.set('firstName', 'NewName')) do not automatically trigger updates through theStateProvider's binding system. Developers must manually proxy these changes by listening to record-level events (if they existed) and updating a separatedataproperty in theStateProvider. This creates boilerplate and hinders seamless reactive binding to nested record properties.Describe the solution you'd like Enhance
Neo.state.Providerto automatically detectNeo.data.Recordinstances within itsdataconfig and subscribe to their granular change notifications (assumingNeo.data.Recordis enhanced to provide such notifications, as per a separate feature request). When a record's property changes, theStateProvidershould propagate this change through its binding system, allowing components to directly bind to nested record properties using a syntax likebind: { text: 'data.currentUser.firstName' }.This would involve:
Neo.data.Recordinstances when they are assigned toStateProvider'sdataproperties.fieldChangeor similar, once implemented inNeo.data.Record).StateProvider-levelonDataPropertyChangenotifications for the specific nested path (e.g.,data.myRecord.fieldName).Describe alternatives you've considered The current alternative is to manually listen for changes on the record (if a mechanism existed) and then explicitly call
stateProvider.setData()for the relevant property. This is verbose and defeats the purpose of a streamlined binding system.Additional context This feature is dependent on the implementation of granular change notifications within
Neo.data.Record. It would significantly improve the developer experience for data-intensive applications, making it much easier to build reactive UIs that respond directly to changes in individual record fields.