Skip to content

Don't update time in range until blur #2736

@david-crespo

Description

@david-crespo

We update the time immediately on keydown in the input, which means if you're changing the minutes you are firing off a ton of queries. Maybe this wouldn't matter if the queries were faster, but it is not great while they're slow. It's also kinda weird for the graph to churn so fast if they're fast.

<TimeField
label="Start time"
value={state.timeRange?.start || null}
onChange={(v) => state.setTime('start', v)}
hourCycle={24}
className="shrink-0 grow basis-0"
/>
<div className="text-quaternary"></div>
<TimeField
label="End time"
value={state.timeRange?.end || null}
onChange={(v) => state.setTime('end', v)}
hourCycle={24}
className="shrink-0 grow basis-0"
/>

2025-03-03-time-range-change.mp4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions