-
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
feat(cdk/focus-trap) Backwards compatible factory create method #18336
feat(cdk/focus-trap) Backwards compatible factory create method #18336
Conversation
b28bade
to
872ad38
Compare
872ad38
to
04ee569
Compare
@@ -6,6 +6,6 @@ | |||
* found in the LICENSE file at https://angular.io/license | |||
*/ | |||
|
|||
export class ConfigurableFocusTrapConfig<D = any> { | |||
export class ConfigurableFocusTrapConfig { | |||
defer: boolean = false; |
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.
We should have docs on the class and the defer
property since it's not immediately obvious what deferring means in this case.
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.
Was this just a request for adding comments or API docs? It looks like this Class isn't in the API docs since it wasn't added to the public API in
components/src/cdk/a11y/public-api.ts
Lines 12 to 16 in c7edf03
export * from './focus-trap/configurable-focus-trap'; | |
export * from './focus-trap/event-listener-inert-strategy'; | |
export * from './focus-trap/focus-trap'; | |
export * from './focus-trap/configurable-focus-trap-factory'; | |
export * from './focus-trap/focus-trap-inert-strategy'; |
Optionally accept a boolean instead of a ConfigurableFocusTrapConfig object in the ConfigurableFocusTrapFactory create method, so that it is backwards compatible with FocusTrapFactory create. This will enable apps to turn on the new functionality with {provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory}.
04ee569
to
2884bbc
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
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. |
Optionally accept a boolean instead of a ConfigurableFocusTrapConfig
object in the ConfigurableFocusTrapFactory create method, so that
it is backwards compatible with FocusTrapFactory create.
This will enable apps to turn on the new functionality with
{provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory}
.