add method for filtering
This commit is contained in:
@@ -15,7 +15,10 @@ export default class SearchViewModel<T> {
|
||||
[this.searchInput],
|
||||
() => this.searchInput.value == "",
|
||||
);
|
||||
hasNoSuggestions: React.State<boolean> = React.createProxyState([this.suggestions], ()=>this.suggestions.value.size == 0);
|
||||
hasNoSuggestions: React.State<boolean> = React.createProxyState(
|
||||
[this.suggestions],
|
||||
() => this.suggestions.value.size == 0,
|
||||
);
|
||||
|
||||
// methods
|
||||
search = (searchTerm: string): void => {
|
||||
@@ -36,12 +39,12 @@ export default class SearchViewModel<T> {
|
||||
};
|
||||
|
||||
clear = (): void => {
|
||||
this.searchInput.value = "";
|
||||
}
|
||||
this.searchInput.value = "";
|
||||
};
|
||||
|
||||
deleteSuggestion = (suggestion: string): void => {
|
||||
this.suggestions.remove(suggestion);
|
||||
}
|
||||
this.suggestions.remove(suggestion);
|
||||
};
|
||||
|
||||
// init
|
||||
constructor(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "../../react";
|
||||
import TaskViewModel from "../Pages/taskViewModel";
|
||||
import * as React from "../../react";
|
||||
|
||||
export default class TaskPropertyBulkChangeViewModel {
|
||||
taskViewModels: React.ListState<TaskViewModel>;
|
||||
|
||||
Reference in New Issue
Block a user