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

Add date range field support #35

Merged
merged 2 commits into from Sep 20, 2018

Conversation

edetec
Copy link
Contributor

@edetec edetec commented Sep 18, 2018

No description provided.

@coveralls
Copy link

coveralls commented Sep 18, 2018

Pull Request Test Coverage Report for Build 340

  • 48 of 55 (87.27%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 81.508%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ng-xform/date-range-field/date-range-field.component.ts 30 37 81.08%
Totals Coverage Status
Change from base Build 333: -0.2%
Covered Lines: 547
Relevant Lines: 630

💛 - Coveralls

componentControl = new FormControl();
private input: HTMLInputElement;

_onChange = (value: any) => { };
Copy link
Member

Choose a reason for hiding this comment

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

Why you need that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid error if it is called before registerOnChange


ngAfterContentInit() {
this.componentControl.setValidators(this.field.validators);
this.config = Object.assign({}, {
Copy link
Member

Choose a reason for hiding this comment

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

Why Object.assign?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove it

this.componentControl.setValue(obj);
}
}
registerOnChange(fn: any): void {
Copy link
Member

Choose a reason for hiding this comment

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

Aren't we using prettier here?

Copy link
Contributor Author

@edetec edetec Sep 19, 2018

Choose a reason for hiding this comment

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

No, just tslinter

@edetec edetec changed the base branch from master to change-validation-behavior September 19, 2018 21:11
@edetec edetec merged commit 45eef98 into change-validation-behavior Sep 20, 2018
edetec added a commit that referenced this pull request Sep 20, 2018
feat(NgXform): validate all fields on submit (#34)
feat(DateRangeField): add Date range field support (#35)
feat(SelectField): add flag to force search on first focus (#36)
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

5 participants