#547 - fix default value

This commit is contained in:
Elio Struyf
2023-03-22 10:43:52 +01:00
parent fafe64d116
commit 623878049a
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -48,6 +48,7 @@
- [#531](https://github.com/estruyf/vscode-front-matter/issues/531): Fix prettier update which caused data views to not render list items
- [#539](https://github.com/estruyf/vscode-front-matter/issues/539): Fix the override of the default file prefix on content creation
- [#543](https://github.com/estruyf/vscode-front-matter/issues/543): Fix JSON schema for script commands
- [#547](https://github.com/estruyf/vscode-front-matter/issues/547): Fix setting default value in a hidden group field (`block`)
## [8.3.0] - 2023-02-14 - [Release notes](https://beta.frontmatter.codes/updates/v8.3.0)
@@ -146,6 +146,10 @@ export const WrapperField: React.FunctionComponent<IWrapperFieldProps> = ({
}, []);
if (field.hidden || fieldValue === undefined) {
if (field.hidden && fieldValue === undefined && field.default) {
onSendUpdate(field.name, field.default, parentFields);
}
return null;
}