Issue: dataFile value selector not closing #570

Closed
opened 2026-10-05 02:53:42 +02:00 by adam · 4 comments
Owner

Describe the bug
When defining dataFile fields the field selector doen't close

To Reproduce
Steps to reproduce the behavior:

  1. Define a data file frontMatter.data.files:
{
  "id": "authors",
  "title": "Authors",
  "file": "[[workspace]]/data/authors.json",
  "fileType": "json",
  "labelField": "slug",
  "schema": {
    "title": "Authors",
    "type": "object",
    "required": ["name", "slug"],
    "properties": {
      "name": {
        "type": "string",
        "title": "Name"
      },
      "slug": {
        "type": "string",
        "title": "Slug"
      }
    }
  }
}
  1. Add a field using that dataFile:
{
  "title": "Author",
  "name": "author",
  "type": "dataFile",
  "dataFileId": "authors",
  "dataFileKey": "slug",
  "dataFileValue": "slug",
  "multiple": false
}
  1. Add 2 items to the data:
[
  {
    "name": "Author A",
    "slug": "author-a"
  },
  {
    "name": "Author B",
    "nickname": "author-b"
  }
]
  1. Try to select a value in content editor

Expected behavior
For the options' selector to close once an option is selected

Screenshots
2023-11-27-front-matter-select-error

Desktop (please complete the following information):

  • OS: WSL: Ubuntu-20.04
  • Version v9.3.1
**Describe the bug** When defining dataFile fields the field selector doen't close **To Reproduce** Steps to reproduce the behavior: 1. Define a data file `frontMatter.data.files`: ```json { "id": "authors", "title": "Authors", "file": "[[workspace]]/data/authors.json", "fileType": "json", "labelField": "slug", "schema": { "title": "Authors", "type": "object", "required": ["name", "slug"], "properties": { "name": { "type": "string", "title": "Name" }, "slug": { "type": "string", "title": "Slug" } } } } ``` 2. Add a field using that dataFile: ```json { "title": "Author", "name": "author", "type": "dataFile", "dataFileId": "authors", "dataFileKey": "slug", "dataFileValue": "slug", "multiple": false } ``` 3. Add 2 items to the data: ```json [ { "name": "Author A", "slug": "author-a" }, { "name": "Author B", "nickname": "author-b" } ] ``` 4. Try to select a value in content editor **Expected behavior** For the options' selector to close once an option is selected **Screenshots** ![2023-11-27-front-matter-select-error](https://github.com/estruyf/vscode-front-matter/assets/3234926/998bb286-c954-48ed-8e54-3f15561633b7) **Desktop (please complete the following information):** - OS: WSL: Ubuntu-20.04 - Version v9.3.1 <!-- github-sync-id:2012236104 -->
adam closed this issue 2026-10-05 02:53:42 +02:00
Author
Owner

@AlbertoFdzM thanks for reporting. Is it open already on load? Or once you clicked on the control?

@AlbertoFdzM thanks for reporting. Is it open already on load? Or once you clicked on the control? <!-- github-comment-id:1828194402 -->
Author
Owner

@AlbertoFdzM thanks for reporting. Is it open already on load? Or once you clicked on the control?

It's already open on load.

Moreover, when there are multiple fields of this type, all of them appear open.

> @AlbertoFdzM thanks for reporting. Is it open already on load? Or once you clicked on the control? It's already open on load. Moreover, when there are multiple fields of this type, all of them appear open. <!-- github-comment-id:2041374027 -->
Author
Owner

Thanks @AlbertoFdzM, I found the issue and pushed a fix. You should be able to test it in the latest beta version.

Thanks @AlbertoFdzM, I found the issue and pushed a fix. You should be able to test it in the latest beta version. <!-- github-comment-id:2042565580 -->
Author
Owner

Tested it. Seems to be working ok now. Thanks.

Tested it. Seems to be working ok now. Thanks. <!-- github-comment-id:2045213400 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#570