Skip to content

Commit 8183cd4

Browse files
committed
Breadcrumb: fix getMeasurementRender for React 19
1 parent a991e4e commit 8183cd4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/ui/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
### Bug Fixes
2929

30+
- `Breadcrumb`: Keep a custom renderer's ref on the visible item ([#84069](https://github.com/WordPress/gutenberg/pull/84069)).
3031
- `Checkbox`: Prevent rounded themes from making checkboxes circular. ([#83526](https://github.com/WordPress/gutenberg/pull/83526))
3132
- `Select`, `SelectControl`, `Combobox`, `SearchableSelect`, `SearchableChipSelect`, `SearchableChipSelectControl`: Align the selected-item checkmark with the first line of the item label while keeping single-line items vertically centered. ([#82942](https://github.com/WordPress/gutenberg/pull/82942))
3233
- `Popover`: Close non-modal popovers when the user presses inside a same-origin iframe. ([#83509](https://github.com/WordPress/gutenberg/pull/83509))

‎packages/ui/src/breadcrumb/measurement-render.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const EVENT_HANDLER_PATTERN = /^on[A-Z]/;
66
function isBehaviorProp( propName: string ) {
77
return (
88
propName === 'id' ||
9-
propName === 'ref' ||
109
propName === 'tabIndex' ||
1110
EVENT_HANDLER_PATTERN.test( propName )
1211
);
@@ -15,7 +14,8 @@ function isBehaviorProp( propName: string ) {
1514
function getMeasurementProps( props: Record< string, unknown > ) {
1615
return Object.fromEntries(
1716
Object.entries( props ).filter(
18-
( [ propName ] ) => ! isBehaviorProp( propName )
17+
( [ propName ] ) =>
18+
! isBehaviorProp( propName ) && propName !== 'ref'
1919
)
2020
);
2121
}

0 commit comments

Comments
 (0)