Skip to content

Conversation

wKovacs64
Copy link
Contributor

I think the focused boolean may have been included in the properties returned from getInputProps by mistake. It looks like this piece of internal state is used to determine whether or not to include the value attribute in the input props based on the current focus. Including focused as a boolean in the input props results in users spreading it on to the input, which triggers the following React warning:

14:40:11.373 Warning: Received `true` for a non-boolean attribute `focused`.

If you want to write it to the DOM, pass a string instead: focused="true" or focused={value.toString()}.
    in input (at CountStepper.js:55)
    in span (at CountStepper.js:33)
    in StepperPrimitive (at CountStepper.js:13)
    ...continued

This change removes it from the input props (but not from the values passed to the render prop). You could also stringify the value as an alternative (which will silence the warning), but I don't believe it should be there to begin with (correct me if I'm wrong).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant