From 23c6b88709a40754c81f25472f047ffa2b9eccb1 Mon Sep 17 00:00:00 2001 From: Ramon Date: Tue, 24 Dec 2024 12:03:04 +1100 Subject: [PATCH] Block supports: show selected item in font family select control (#68254) Co-authored-by: ramonjd Co-authored-by: talldan --- packages/block-editor/src/components/font-family/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/font-family/index.js b/packages/block-editor/src/components/font-family/index.js index 6a723bb24c48ec..b685e3990287fe 100644 --- a/packages/block-editor/src/components/font-family/index.js +++ b/packages/block-editor/src/components/font-family/index.js @@ -72,12 +72,14 @@ export default function FontFamilyControl( { ); } + const selectedValue = + options.find( ( option ) => option.key === value ) ?? ''; return ( onChange( selectedItem.key ) } options={ options } className={ clsx( 'block-editor-font-family-control', className, {