package miaou-core
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Miaou core/widgets (no drivers, no SDL)
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.5.2.tar.gz
md5=60a3b9f181f24572a06a9492532bfdda
sha512=fcc35a275066be2900e6201782faf47503076fa4640f08cf78067835a6f447b74613009e55b2ac799adb7ca46f1bffa261fc5971753f2cc3c6bef327511c7ef6
doc/miaou-core.helpers/Miaou_helpers/Debounce/index.html
Module Miaou_helpers.DebounceSource
Generic debounce timer for deferring operations during rapid input.
This module provides a thread-safe debounce mechanism useful for:
- Deferring expensive validation until typing pauses
- Rate-limiting filesystem operations during path editing
- Coalescing rapid UI events
Example usage:
let debouncer = Debounce.create ~debounce_ms:250 ()
(* On each input event *)
let on_input () =
Debounce.mark debouncer;
Render_notify.request_render ()
(* In service_cycle *)
let service_cycle state _ =
if Debounce.check_and_clear debouncer then
run_expensive_operation state
else
stateA debounce timer instance.
Check if the debounce period has elapsed since the last event. Returns true if there's a pending event and enough time has passed.
Check if there's a pending event (regardless of whether debounce elapsed).
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>