Add clickable list titles

This commit is contained in:
John R. Supplee 2021-01-20 21:52:27 +02:00
parent 6d9928ea8f
commit 52f920db12
4 changed files with 36 additions and 2 deletions

View file

@ -42,6 +42,7 @@ BlazeComponent.extendComponent({
this.query = new ReactiveVar('');
this.resultsHeading = new ReactiveVar('');
this.searchLink = new ReactiveVar(null);
this.myLists = new ReactiveVar([]);
this.queryParams = null;
this.parsingErrors = [];
this.resultsCount = 0;
@ -55,6 +56,13 @@ BlazeComponent.extendComponent({
// }
// // eslint-disable-next-line no-console
// console.log('colorMap:', this.colorMap);
Meteor.call('myLists', (err, data) => {
if (!err) {
this.myLists.set(data);
}
});
Meteor.subscribe('setting');
if (Session.get('globalQuery')) {
this.searchAllBoards(Session.get('globalQuery'));
@ -375,6 +383,11 @@ BlazeComponent.extendComponent({
`${this.query.get()} label:"${evt.currentTarget.textContent}"`,
);
},
'click .js-list-title'(evt) {
this.query.set(
`${this.query.get()} list:"${evt.currentTarget.textContent}"`,
);
},
},
];
},