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

feat(elements|ino-datepicker): provide error property #429

Merged
merged 3 commits into from
Oct 18, 2021

Conversation

BenPag
Copy link
Collaborator

@BenPag BenPag commented Sep 16, 2021

Relates to #423

Proposed Changes

  • add property error to enable error state programmatically

pfecht
pfecht previously approved these changes Sep 16, 2021
/**
* Displays the datepicker as invalid if set to true.
* If the property is not set or set to false,
* the validation is handled by the default validation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the error prop have three states:

  • null|undefined => use native validation
  • true => has error
  • false => has no error

If I integrate the component and manually set the error=false, I wouldn't suggest that the component still natively validates.

This may be something we should unify across all components

@BenPag BenPag marked this pull request as ready for review October 11, 2021 12:49
@BenPag BenPag requested review from janivo and pfecht October 14, 2021 09:26
@janivo janivo merged commit 43f37ef into master Oct 18, 2021
@janivo janivo deleted the elements-ino-datepicker-error-state branch October 18, 2021 08:14
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.

3 participants