-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(tabs): better handling of animationDuration without units #14778
fix(tabs): better handling of animationDuration without units #14778
Conversation
src/lib/tabs/tab-group.ts
Outdated
@Input() | ||
get animationDuration(): string { return this._animationDuration; } | ||
set animationDuration(value: string) { | ||
this._animationDuration = (typeof value === 'number' || !cssUnitPattern.test(value)) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to not just check that the value matches ^\d+$
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, that's much more concise. Changed.
Based off of the discussions on angular#13428. Handles values passed to `animationDuration` that don't have units, rather than allowing them to continue through to the `BrowserAnimationsModule` and to throw an error.
2f2addf
to
f1ca702
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…r#14778) Based off of the discussions on angular#13428. Handles values passed to `animationDuration` that don't have units, rather than allowing them to continue through to the `BrowserAnimationsModule` and to throw an error.
…r#14778) Based off of the discussions on angular#13428. Handles values passed to `animationDuration` that don't have units, rather than allowing them to continue through to the `BrowserAnimationsModule` and to throw an error.
Based off of the discussions on #13428. Handles values passed to `animationDuration` that don't have units, rather than allowing them to continue through to the `BrowserAnimationsModule` and to throw an error.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Based off of the discussions on #13428. Handles values passed to
animationDuration
that don't have units, rather than allowing them to continue through to theBrowserAnimationsModule
and to throw an error.