Skip to content

Commit 036831d

Browse files
author
jvictordev1
committed
fix: corrige duplicidade do evento ao preencher input e pressionar enter
1 parent 02e9b67 commit 036831d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/DataTable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,12 @@ function handleOk(fieldsList) {
508508
509509
function handleSearchInput(value, source) {
510510
if (source === 'button') {
511+
searchTimeout.value && clearTimeout(searchTimeout.value);
511512
emits('search-button-click', value);
512513
return;
513514
}
514515
515-
if (!props.withSearchButton) {
516+
if (!props.withSearchButton && source === 'input') {
516517
clearTimeout(searchTimeout.value);
517518
searchTimeout.value = setTimeout(() => {
518519
emits('search', value);

0 commit comments

Comments
 (0)