Fix subquery change propagation

This commit is contained in:
shamoon 2024-09-02 09:26:09 -07:00
parent 1ff187b15f
commit dc5a30b161

View File

@ -82,7 +82,13 @@ export class CustomFieldQueryExpression extends CustomFieldQueryComponent {
if (!values) {
this._value = []
} else if (values?.length > 0 && values[0] instanceof Array) {
this._value = values.map((value) => new CustomFieldQueryAtom(value))
this._value = values.map((value) => {
const atom = new CustomFieldQueryAtom(value)
atom.changed.subscribe(() => {
this.changed.next(this)
})
return atom
})
} else {
this._value = new CustomFieldQueryExpression(values as any)
}