reflex icon indicating copy to clipboard operation
reflex copied to clipboard

[REF-2250] Investigate generic debounce

Open picklelo opened this issue 1 year ago β€’ 1 comments

Currently the rx.debounce works well with inputs and textareas. Is there a way we can generalize this to work for all components such as rx.slider or the color picker example in the docs?

Current docs: https://reflex.dev/docs/library/forms/debounce/#debounce

REF-2250

picklelo avatar Mar 18 '24 02:03 picklelo

Modifying queueEvents like this within utils/state.js seems to work. We should probably make this a flag though, we mayn't want to do this for all events.

export const queueEvents = async (events, socket) => {
  // Filter out any events already in the queue.
  events = events.filter((event) => {
    for (const queued_event of event_queue) {
      if (queued_event.name === event.name) {
        return false;
      }
    }
    return true;
  });
  event_queue.push(...events);
  await processEvent(socket.current);
};

picklelo avatar Apr 04 '24 19:04 picklelo

fixed in https://github.com/reflex-dev/reflex/pull/3091

masenf avatar May 29 '24 21:05 masenf