Skip to content

Commit 708085a

Browse files
authored
Merge pull request #514 from devforth/feature/AdminForth/1336/add-debounce-to-filters-when-u
fix: increase debounce value
2 parents 6129e10 + d04cfd2 commit 708085a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adminforth/modules/configValidator.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { AdminForthConfigMenuItem } from "adminforth";
3232
import { afLogger } from "./logger.js";
3333
import {cascadeChildrenDelete} from './utils.js'
3434

35+
const DEBOUNCE_TIME_MS = 300;
3536
export default class ConfigValidator implements IConfigValidator {
3637

3738
customComponentsDir: string | undefined;
@@ -484,7 +485,7 @@ export default class ConfigValidator implements IConfigValidator {
484485
// define default filter options
485486
if (!Object.keys(col).includes('filterOptions')) {
486487
col.filterOptions = {
487-
debounceTimeMs: 10,
488+
debounceTimeMs: DEBOUNCE_TIME_MS,
488489
substringSearch: true,
489490
};
490491
if (col.enum || col.foreignResource || col.type === AdminForthDataTypes.BOOLEAN) {
@@ -496,7 +497,7 @@ export default class ConfigValidator implements IConfigValidator {
496497
errors.push(`Resource "${res.resourceId}" column "${col.name}" filterOptions.debounceTimeMs must be a number`);
497498
}
498499
} else {
499-
col.filterOptions.debounceTimeMs = 10;
500+
col.filterOptions.debounceTimeMs = DEBOUNCE_TIME_MS;
500501
}
501502

502503
if (col.filterOptions.substringSearch !== undefined) {

0 commit comments

Comments
 (0)