Skip to content

Commit

Permalink
chore: making 500 the default delay for debounce
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Muñoz <juan.munoz@alliander.com>
  • Loading branch information
juancho0202 committed Oct 30, 2023
1 parent 54906a1 commit b5a4049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/oscd-filtered-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { TextField } from '@material/mwc-textfield';
import '@material/mwc-list/mwc-list-item-base';
import { ListItem } from '@material/mwc-list/mwc-list-item';

function debounce(callback: () => void, delay = 250): Promise<void> {
function debounce(callback: () => void, delay = 500): Promise<void> {
let timeout: any;
return new Promise(resolve => {
clearTimeout(timeout);
Expand Down Expand Up @@ -163,7 +163,7 @@ export class OscdFilteredList extends LitElement {
'mwc-list-item, mwc-check-list-item, mwc-radio-list-item'
)
).forEach(item => hideFiltered(item as ListItem, this.searchField.value));
}, 500);
});
}

firstUpdated(): void {
Expand Down

0 comments on commit b5a4049

Please sign in to comment.