fix(Panel): Add event listener to Panel in order to update the footer's sticky property correctly when content changes dynamically #33520
+27
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
Panel
component in the@fluentui/react
package to fix the footer's sticky property when content changes dynamically. The most important changes include adding aResizeObserver
to monitor content changes and updating the footer position accordingly.Enhancements to
Panel
component:Panel
component to update the footer's sticky property when content changes dynamically. (change/@fluentui-react-da358841-feeb-4166-a7d8-e955d9e51ad7.json
)Codebase improvements:
_resizeObserver
property in thePanelBase
class to observe content size changes. (packages/react/src/components/Panel/Panel.base.tsx
)ResizeObserver
is disconnected when the component unmounts to prevent memory leaks. (packages/react/src/components/Panel/Panel.base.tsx
)_createResizeObserver
to create and return aResizeObserver
instance. (packages/react/src/components/Panel/Panel.base.tsx
)_allowScrollOnPanel
method to initialize and observe theResizeObserver
, and update the footer position when content changes. (packages/react/src/components/Panel/Panel.base.tsx
)Fixes #33508