diff --git a/tools/oversight/slicer.js b/tools/oversight/slicer.js index 9e6a4aac..d0606a58 100644 --- a/tools/oversight/slicer.js +++ b/tools/oversight/slicer.js @@ -431,9 +431,14 @@ const io = new IntersectionObserver((entries) => { loadData(elems.viewSelect.value).then(draw); } + let filterInputDebounce; + const debounceTimeout = view === 'week' ? 1000 : 0; elems.filterInput.addEventListener('input', () => { - updateState(); - draw(); + clearTimeout(filterInputDebounce); + filterInputDebounce = setTimeout(() => { + updateState(); + draw(); + }, debounceTimeout); }); elems.viewSelect.addEventListener('change', () => { diff --git a/tools/rum/slicer.js b/tools/rum/slicer.js index 30f024c9..e743e54a 100644 --- a/tools/rum/slicer.js +++ b/tools/rum/slicer.js @@ -381,9 +381,14 @@ const io = new IntersectionObserver((entries) => { loadData(elems.viewSelect.value).then(draw); } + let filterInputDebounce; + const debounceTimeout = view === 'week' ? 1000 : 0; elems.filterInput.addEventListener('input', () => { - updateState(); - draw(); + clearTimeout(filterInputDebounce); + filterInputDebounce = setTimeout(() => { + updateState(); + draw(); + }, debounceTimeout); }); elems.viewSelect.addEventListener('change', () => {