Skip to content

validate = 'change' does not work for select component  #6303

@anshu-kri

Description

@anshu-kri

Expected Behavior

When Form element has validate="change".. The select component inside should validate onChange..

Actual Behavior

When Form element has validate="change".. The select component inside should validate onChange.. It is not validating onChange, instead when there is change on any other field inside that form then the validate is fired.

URL, screen shot, or Codepen exhibiting the issue

Here's a Codesandbox template that serves as a nice starting point for demonstrating an issue: https://codesandbox.io/s/wonderful-pascal-74dubv?file=/src/App.js

Steps to Reproduce

  1. Select any option in select component.. Notice the validate is not happening
  2. Now type a letter in textInput and validate will happen for both select and textInput component.

Your Environment

  • Grommet version: 2.25.1
  • Browser Name and version: Chrome
  • Operating System and version (desktop or mobile): Desktop (Windows)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissue that does not match design or documentation and requires code changes to address

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions