From 121a84659f350528241b44ae0845c220910b43dc Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 18 Sep 2024 09:18:58 +0200 Subject: [PATCH] Show non-empty fields in metadata panel #849 --- CHANGELOG.md | 1 + src/panelWebView/components/Fields/WrapperField.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f1cedf5..a574a4d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [#842](https://github.com/estruyf/vscode-front-matter/issues/842): Allow to set the `frontMatter.taxonomy.slugTemplate` setting to an empty string - [#845](https://github.com/estruyf/vscode-front-matter/issues/845): Fix empty values for number fields +- [#849](https://github.com/estruyf/vscode-front-matter/issues/849): Show fields which are not empty in the metadata panel ### 🚧 Work in progress diff --git a/src/panelWebView/components/Fields/WrapperField.tsx b/src/panelWebView/components/Fields/WrapperField.tsx index 9de2e2ae..ab14bbbd 100644 --- a/src/panelWebView/components/Fields/WrapperField.tsx +++ b/src/panelWebView/components/Fields/WrapperField.tsx @@ -153,7 +153,9 @@ export const WrapperField: React.FunctionComponent = ({ onSendUpdate(field.name, field.default, parentFields); } - return null; + if (field.hidden) { + return null; + } } // Conditional fields