-
Notifications
You must be signed in to change notification settings - Fork 4.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
Refactor #12031 - Component: Responsive Overlay #12096
Conversation
} | ||
|
||
ngAfterViewChecked() { | ||
if (!this.initialized) { | ||
this.ngAfterViewInit(); |
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.
Hi, this looks weird. I think it's better to create a private method and call it instead of using the component's lifecycle method.
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.
Hi, thanks a lot for your review! I agree with you. I'll update this line.
export interface OverlayOptions { | ||
style?: any; | ||
styleClass?: string; | ||
appendTo?: 'body' | HTMLElement | undefined; |
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.
Hi, I think you should also add 'self' for type
appendTo?: 'body' | 'self' | HTMLElement;
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.
Yes, this enhancement already exists in our roadmap. We will port a structure like in PrimeReact. https://www.primefaces.org/primereact/setup/
|
||
export interface OverlayOnShowEvent { | ||
container?: HTMLElement | undefined; | ||
target?: HTMLElement | undefined; |
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.
It's not the same?
target?: HTMLElement;
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.
No, the container
is an 'overlay' element like dropdown's overlay. The target
is an element that manages the overlay.
Exp;
container: div.p-overlay.p-component.ng-star-inserted....
target: div.p-dropdown.p-component.p-dropdown-open.p-dropdown-clearable...
The container is an HTML element with a 'p-overlay'(mode: 'overlay') or 'p-overlay-modal'(mode: 'modal') class depending on the mode.
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.
Note: This line has been updated.
Any idea when this will be released? |
@paulstelzer I'm working on virtualScroller issues now. We plan to release it next week. |
Refactor #12031