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

DatePicker: utilize custom onChange handler when provided #10424

Merged

Conversation

natalieethell
Copy link
Contributor

@natalieethell natalieethell commented Sep 11, 2019

Pull request checklist

Description of changes

These changes integrate the optional custom onChange handler within the existing default onChange handler.

Now, a user can pass in their own onChange handler to the textField prop of DatePicker and see their onChange called.

I made these changes both to the date-time package and the office-ui-fabric-react package. Let me know if these changes should just go in one.

Focus areas to test

Ensure that a custom onChange handler is called in addition to the existing default onChange handler.

I added a test for this scenario, too.

Microsoft Reviewers: Open in CodeFlow

@size-auditor
Copy link

size-auditor bot commented Sep 11, 2019

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react DatePicker 201.537 kB 201.593 kB ExceedsBaseline     56 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 72e835bd59d6c29b1a222fccdd5c57a339c73090 (build)

@msft-github-bot
Copy link
Contributor

Component Perf Analysis

No significant results to display.

All results

Scenario Master Ticks PR Ticks Status
BaseButton 770 767
BaseButton (experiments) 1003 1079
DefaultButton 1020 1025
DefaultButton (experiments) 1965 1985
DetailsRow 3397 3351
DetailsRow (fast icons) 3400 3336
DetailsRow without styles 3098 3122
DocumentCardTitle with truncation 31826 31645
MenuButton 1391 1326
MenuButton (experiments) 3564 3592
PrimaryButton 1226 1222
PrimaryButton (experiments) 2058 2044
SplitButton 2906 2929
SplitButton (experiments) 7257 7147
Stack 499 503
Stack with Intrinsic children 1144 1141
Stack with Text children 4443 4397
Text 365 365
Toggle 862 820
Toggle (experiments) 2360 2264
button 73 71

@KevinTCoughlin
Copy link
Member

@lorejoh12 will be back starting tomorrow so hopefully he can take a look once settled at work :)

@msft-github-bot
Copy link
Contributor

Hello @KevinTCoughlin!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-github-bot) and give me an instruction to get started! Learn more here.

@msft-github-bot msft-github-bot merged commit 12fc372 into microsoft:master Sep 14, 2019
@msft-github-bot
Copy link
Contributor

🎉@uifabric/date-time@v7.4.5 has been released which incorporates this pull request.:tada:

Handy links:

@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v7.34.0 has been released which incorporates this pull request.:tada:

Handy links:

msft-github-bot pushed a commit that referenced this pull request Sep 19, 2019
…rovided #10424" (#10478)

* call onChange in default onChange handler

* add test for onChange

* Change files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DatePicker] textField prop: onChange is never being called
5 participants