mirror of
https://github.com/wekan/wekan.git
synced 2026-03-11 08:02:33 +01:00
Global search development
* Add text query ability * limit results to 50 * display results count
This commit is contained in:
parent
34000ad159
commit
2e17f2b4b9
3 changed files with 18 additions and 2 deletions
|
|
@ -41,6 +41,7 @@ BlazeComponent.extendComponent({
|
|||
this.hasResults = new ReactiveVar(false);
|
||||
this.query = new ReactiveVar('');
|
||||
this.queryParams = null;
|
||||
this.resultsCount = new ReactiveVar(0);
|
||||
|
||||
// this.autorun(() => {
|
||||
// const handle = subManager.subscribe('globalSearch');
|
||||
|
|
@ -55,7 +56,9 @@ BlazeComponent.extendComponent({
|
|||
|
||||
results() {
|
||||
if (this.queryParams) {
|
||||
return Cards.globalSearch(this.queryParams);
|
||||
const cards = Cards.globalSearch(this.queryParams);
|
||||
this.resultsCount.set(cards.count());
|
||||
return cards;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue