You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component with search-by-query. Something like this:
<input value="{{ query }}" />
import {Component} from 'derby';
export class UserSearchForm extends Component {
static readonly is = 'user-search-form';
static readonly view = __dirname;
create() {
this.model.on('all', 'query', () => {
this.onSearch();
});
this.onSearch();
}
onSearch() {
// Omitting unsubscribe old query and other stuff. It does no matter, i tested
let $query = this.model.root.query('user', {some: this.model.get('query')});
$query.subscribe(() => {
this.model.ref('users', $query); // Important to create ref to reproduce the bug
});
}
}
And page template. Important to create binding with name as-ref (users) and bing it to __page
Now run and make some searches - it works. Then change index.html template (let add some symbol) in dev mode with live-update. And search again. And change template and search again and etc.
After several iterates derby will try to write to users, but there is no sets in code.
I guess this is because it tries to rewrite old items in _page.users with new search results ot someting like this.
The text was updated successfully, but these errors were encountered:
After several iterates derby will try to write to
users
, but there is nosets
in code.I guess this is because it tries to rewrite old items in _page.users with new search results ot someting like this.
The text was updated successfully, but these errors were encountered: