mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
filter docs by category, search query params
This commit is contained in:
parent
666ab3151e
commit
9fd53142f3
6 changed files with 18 additions and 19 deletions
|
@ -10,13 +10,13 @@
|
|||
// https://documize.com
|
||||
|
||||
import { debounce } from '@ember/runloop';
|
||||
|
||||
import { inject as service } from '@ember/service';
|
||||
import Controller from '@ember/controller';
|
||||
|
||||
export default Controller.extend({
|
||||
searchService: service('search'),
|
||||
filter: "",
|
||||
queryParams: ['filter', 'matchDoc', 'matchContent', 'matchTag', 'matchFile'],
|
||||
filter: '',
|
||||
results: [],
|
||||
matchDoc: true,
|
||||
matchContent: true,
|
||||
|
@ -30,12 +30,15 @@ export default Controller.extend({
|
|||
onMatchDoc: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchDoc'),
|
||||
|
||||
onMatchContent: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchContent'),
|
||||
|
||||
onMatchTag: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchTag'),
|
||||
|
||||
onMatchFile: function () {
|
||||
debounce(this, this.fetch, 750);
|
||||
}.observes('matchFile'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue