Skip to content

[TextField] Adjust onBlur logic so that it does not trigger when clicking on the Spinner within the text field #10948

@zaquille-oneil

Description

@zaquille-oneil

Feature Request Summary

  • The TextField component has a prop onBlur which triggers when a user blurs from the input rendered in the component.
  • The TextField component has a prop type which can accept string values such as "integer" or "number". when passed one of these values, the component automatically renders a <Spinner /> that is right aligned to the component
    • image

Problem: onBlur triggers when a user clicks on the spinner. I don't believe this is the right functionality. If <TextField/> represents the entire component, then onBlur logic should fire only if the user blurs off of any encapsulated components within <TextField/>

Potential issues that are caused: https://github.com/Shopify/web/pull/100618#issuecomment-1750719404

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions