Skip to content

[Bug] Query ref does not works in scoped models #585

@IAkumaI

Description

@IAkumaI
  1. Create some component
import {Component} from 'derby';

export class MyComp extends Component {
    static readonly is = 'my-comp';
    static readonly view = __dirname;

    create() {
        let $query = this.model.query('collection', {query:1});
        $query.subscribe();
        $query.ref('list'); // Now list will always empty array, but $query.get() contains items

        let $query = this.model.root.query('collection', {query:1});
        $query.subscribe();
        this.model.ref('list', $query); // But root-variant works
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions