Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required prop for Taxonomy Picker #600

Merged
merged 2 commits into from
Jul 3, 2020
Merged

Required prop for Taxonomy Picker #600

merged 2 commits into from
Jul 3, 2020

Conversation

AJIXuMuK
Copy link
Collaborator

@AJIXuMuK AJIXuMuK commented Jul 3, 2020

Q A
Bug fix? [ ]
New feature? [x]
New sample? [ ]
Related issues? implements #216

What's in this Pull Request?

The PR adds 3 new properties to TaxonomyPicker control:

Property Type Required Description
errorMessage string no Static error message displayed below the picker. Use onGetErrorMessage to dynamically change the error message displayed (if any) based on the current value. errorMessage and onGetErrorMessage are mutually exclusive (errorMessage takes precedence).
onGetErrorMessage (value: IPickerTerms) => string | Promise<string> no The method is used to get the validation error message and determine whether the picker value is valid or not. Mutually exclusive with the static string errorMessage (it will take precedence over this).
When it returns string:
  • If valid, it returns empty string.
  • If invalid, it returns the error message string and the picker will show an error message below the picker.

When it returns Promise<string>:
  • The resolved value is display as error message.
  • The rejected, the value is thrown away.
required boolean no Specifies if to display an asterisk near the label. Note that error message should be specified in onGetErrorMessage or errorMessage

@AJIXuMuK AJIXuMuK merged commit b6f6a7e into dev Jul 3, 2020
@AJIXuMuK AJIXuMuK added this to the 1.20.0 milestone Jul 4, 2020
@estruyf estruyf mentioned this pull request Sep 9, 2020
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.

None yet

1 participant