From 295732867586ac1420739cf6f6cf5d08e17a3721 Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 24 Dec 2024 07:46:12 +1100 Subject: [PATCH] It's customary to show the selected item in a select list. Let's do that. --- 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, {