orbitjs / orbit

Composable data framework for ambitious web applications.
https://orbitjs.com
MIT License
2.33k stars 134 forks source link

[Feature] Livequery: Listen to relevant attribute/relationship changes only #942

Open SafaAlfulaij opened 2 years ago

SafaAlfulaij commented 2 years ago

Often I use findRecords andfindRelatedRecords livequeries to display lists of data. This list cares about what it displays only. For example, in a list of purchase orders: the record itself, the seller name and the date of the purchase (used for ordering only).

Livequeries currently are reactive based on any change to any of the observed records. If one of the sellers email got changed in a findRecords("purchaseOrder") livequery, a trigger will occur and the application needs to re-render the data (React as an example).

It would be nice if we can specify an option to observe specific attribute or relationship changes only.