{"title":"Table of contents (ToC)","name":"toc","type":"fields","fields":[{"title":"Show ToC?","name":"show","type":"boolean","default":true},{"title":"Open ToC?","name":"open","type":"boolean","default":true,"when":{"fieldRef":"show","operator":"eq","value":true}}]}
The idea is to show the "Open ToC?" field only if ToC is enabled.
When I disable "Show ToC?" and enable it again, I expect the value of "Open ToC?" to also be enabled because the default value is true. In the UI, it is shown as true but in the front matter, the field is missing.
To Reproduce
Steps to reproduce the behavior:
Create a field as in the example
Toggle "Show ToC?" to false
Toggle "Show ToC?" to true
Now in the GUI, the value of "Open ToC?" will be true but that field will be missing in the front matter.
Expected behavior
I expect the GUI and the front matter to be the same.
Now I have to toggle "OpenToC" to false and then true to enable it.
Device:
OS: [e.g. iOS] macOS
Front Matter CMS Version [e.g. 10.2.0] 10.5.0
**Describe the bug**
I created a field like this:
```json
{
"title": "Table of contents (ToC)",
"name": "toc",
"type": "fields",
"fields": [
{
"title": "Show ToC?",
"name": "show",
"type": "boolean",
"default": true
},
{
"title": "Open ToC?",
"name": "open",
"type": "boolean",
"default": true,
"when": {
"fieldRef": "show",
"operator": "eq",
"value": true
}
}
]
}
```
The idea is to show the "Open ToC?" field only if ToC is enabled.
When I disable "Show ToC?" and enable it again, I expect the value of "Open ToC?" to also be enabled because the default value is true. In the UI, it is shown as true but in the front matter, the field is missing.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a field as in the example
2. Toggle "Show ToC?" to false
3. Toggle "Show ToC?" to true
4. Now in the GUI, the value of "Open ToC?" will be true but that field will be missing in the front matter.
**Expected behavior**
I expect the GUI and the front matter to be the same.
Now I have to toggle "OpenToC" to false and then true to enable it.
**Device:**
- OS: [e.g. iOS] macOS
- Front Matter CMS Version [e.g. 10.2.0] 10.5.0
<!-- github-sync-id:2605292359 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Describe the bug
I created a field like this:
The idea is to show the "Open ToC?" field only if ToC is enabled.
When I disable "Show ToC?" and enable it again, I expect the value of "Open ToC?" to also be enabled because the default value is true. In the UI, it is shown as true but in the front matter, the field is missing.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the GUI and the front matter to be the same.
Now I have to toggle "OpenToC" to false and then true to enable it.
Device: