TimeInput - reduce redundant section field state and branching
Author: Sulaymon333Created Sep 22, 2026Updated Sep 22, 2026
This ticket is part of the larger #8078 effort to clean up TimeInput and align it with Grommet standards.
Expected Behavior TimeInput's internal section field should retain only state used by digit entry and express minute-step behavior without redundant branches.
Actual Behavior
The section field stores an unread previousValue, repeats unit-step handling for non-minute sections, and duplicates its numeric-section predicate during paste parsing. These do not change behavior but obscure the hook's invariants.
URL, Screenshot, or CodeSandbox No response
Steps to Reproduce
- Inspect the TimeInput section-field hook.
- Observe that
previousValueis written but never read. - Observe that non-minute sections always use a step of
1, despite separate redundant branches.
Source: grommet/grommet