frontend/.pnpm-store/v3/files/ea/d3b2aee942a68be3433c1926147ea4fb13203be7e5bd5c1fc0a890d4fe091d41babb7dd41fa8bd9fbdad793ae525c17f24b633c81f7f6f6862f1831f7725fc

19 lines
462 B
Plaintext

export default class Search {
globalSearch;
constructor(context) {
this.globalSearch = context.globalSearch;
}
set(value, scope = null) {
this.globalSearch.update(store => {
store = {
value: value ?? '',
scope: scope ?? null
};
return store;
});
}
remove() {
this.globalSearch.set({ value: null, scope: null });
}
}