LearnNewsExamplesServices
Frontmatter
id5602
titlemodel.Component: Improve support for using data records inside VM data properties & binding into record fields
stateClosed
labels
enhancementstale
assignees[]
createdAtJul 22, 2024, 9:01 AM
updatedAtNov 4, 2024, 3:37 AM
githubUrlhttps://github.com/neomjs/neo/issues/5602
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 4, 2024, 3:37 AM

model.Component: Improve support for using data records inside VM data properties & binding into record fields

Closed v8.1.0 enhancementstale
tobiu
tobiu commented on Jul 22, 2024, 9:01 AM

VMs have a safeguard to not change the internal structure of records: https://github.com/neomjs/neo/blob/dev/src/model/Component.mjs#L518

Normally, each object property would get replaced with setters to get change events, but this could easily break the internal logic of records, which is also get & set driven.

if we wanted to bind to specific record fields, we would need to extend the logic a bit: e.g. somewhere here: https://github.com/neomjs/neo/blob/dev/src/data/RecordFactory.mjs#L329

records do fire change events on their store, but we would need a notification for a given VM which then could trigger onDataPropertyChange().

tobiu added the enhancement label on Jul 22, 2024, 9:01 AM