Skip to content

Commit

Permalink
fix(nav): Reverts PR #10644 that caused regression (#11099)
Browse files Browse the repository at this point in the history
* fix(nav):  Reverts PR #10644 that caused regression

* fix failing snapshot tests
  • Loading branch information
tlabaj authored Oct 7, 2024
1 parent bd6b854 commit b5ab02e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`Disclosure ExpandableSection 1`] = `
>
<button
aria-controls="content-id"
aria-expanded="false"
class="pf-v5-c-expandable-section__toggle"
id="toggle-id"
type="button"
Expand Down Expand Up @@ -103,6 +104,7 @@ exports[`ExpandableSection 1`] = `
>
<button
aria-controls="content-id"
aria-expanded="false"
class="pf-v5-c-expandable-section__toggle"
id="toggle-id"
type="button"
Expand Down Expand Up @@ -238,6 +240,7 @@ exports[`Renders Uncontrolled ExpandableSection 1`] = `
>
<button
aria-controls="content-id"
aria-expanded="false"
class="pf-v5-c-expandable-section__toggle"
id="toggle-id"
type="button"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-core/src/helpers/resizeObserver.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { canUseDOM, debounce } from './util';
import { canUseDOM } from './util';

/**
* This function creates a ResizeObserver used to handle resize events for the given containerRef. If ResizeObserver
Expand Down Expand Up @@ -83,7 +83,7 @@ export const getResizeObserver = (
if (useRequestAnimationFrame) {
window.requestAnimationFrame(() => {
if (Array.isArray(entries) && entries.length > 0) {
debounce(handleResize, 100);
handleResize();
}
});
// Avoid wrapping function in requestAnimationFrame if the function is debounced
Expand Down

0 comments on commit b5ab02e

Please sign in to comment.