Merge pull request 'Debounce word filters' (#188) from debounce-wordfilter into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: AkkomaGang/pleroma-fe#188
This commit is contained in:
commit
721e3b016d
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { filter, trim } from 'lodash'
|
import { filter, trim, debounce } from 'lodash'
|
||||||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||||
import ChoiceSetting from '../helpers/choice_setting.vue'
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
||||||
import IntegerSetting from '../helpers/integer_setting.vue'
|
import IntegerSetting from '../helpers/integer_setting.vue'
|
||||||
|
@ -27,13 +27,13 @@ const FilteringTab = {
|
||||||
get () {
|
get () {
|
||||||
return this.muteWordsStringLocal
|
return this.muteWordsStringLocal
|
||||||
},
|
},
|
||||||
set (value) {
|
set: debounce(function (value) {
|
||||||
this.muteWordsStringLocal = value
|
this.muteWordsStringLocal = value
|
||||||
this.$store.dispatch('setOption', {
|
this.$store.dispatch('setOption', {
|
||||||
name: 'muteWords',
|
name: 'muteWords',
|
||||||
value: filter(value.split('\n'), (word) => trim(word).length > 0)
|
value: filter(value.split('\n'), (word) => trim(word).length > 0)
|
||||||
})
|
})
|
||||||
}
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Updating nested properties
|
// Updating nested properties
|
||||||
|
|
Loading…
Reference in a new issue