mirror of
https://github.com/gotson/komga.git
synced 2025-01-09 04:08:00 +08:00
fix(webui): add debouncer when searching for author in Edit Book dialog
Closes: #960
This commit is contained in:
parent
59e6517488
commit
da3d283503
@ -412,6 +412,7 @@ import {helpers, requiredIf} from 'vuelidate/lib/validators'
|
||||
import {BookDto, BookThumbnailDto} from '@/types/komga-books'
|
||||
import IsbnVerify from '@saekitominaga/isbn-verify'
|
||||
import {isMatch} from 'date-fns'
|
||||
import {debounce} from 'lodash'
|
||||
import {ERROR, ErrorEvent} from '@/types/events'
|
||||
import DropZone from '@/components/DropZone.vue'
|
||||
import ThumbnailCard from '@/components/ThumbnailCard.vue'
|
||||
@ -488,10 +489,10 @@ export default Vue.extend({
|
||||
},
|
||||
authorSearch: {
|
||||
deep: true,
|
||||
async handler(val: []) {
|
||||
handler: debounce(async function (this: any, val: []) {
|
||||
const index = val.findIndex(x => x !== null)
|
||||
this.authorSearchResults = await this.$komgaReferential.getAuthorsNames(val[index])
|
||||
},
|
||||
}, 500),
|
||||
},
|
||||
},
|
||||
validations: {
|
||||
|
Loading…
Reference in New Issue
Block a user