lyndsiWilliams opened a new pull request #14530:
URL: https://github.com/apache/superset/pull/14530


   ### SUMMARY
   I have created a new dynamic error-bound input. When the user interacts with 
this form, if an error occurs (designated by a function passed into the 
`validationMethods` parameter), the error will replace any existing helper text 
until the error is resolved. `<LabeledErrorBoundInput />` accepts the following 
parameters in order to customize the input:
   ```label?: string;
     name: string;
     validationMethods:
       | { onBlur: (value: any) => void }
       | { onChange: (value: any) => void };
     errorMessage: string | null;
     helpText?: string;
     value: string | number | readonly string[] | undefined;
     required?: boolean;
     placeholder?: string;
     autocomplete?: string;
     type?: string;
     id?: string;
   ```
   
   ### ANIMATED GIF
   
![labeledErrorInput](https://user-images.githubusercontent.com/55605634/117498075-e8976080-af3e-11eb-8779-6d6ddf8f1da0.gif)
   
   
   ### TEST PLAN
   - Run Storybook
   - Click Form > Interactive Form
   - Type success into the input to observe error behavior
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to