Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue: dataFile value selector not closing #716

Closed
AlbertoFdzM opened this issue Nov 27, 2023 · 4 comments
Closed

Issue: dataFile value selector not closing #716

AlbertoFdzM opened this issue Nov 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@AlbertoFdzM
Copy link

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
@AlbertoFdzM AlbertoFdzM added the bug Something isn't working label Nov 27, 2023
@estruyf
Copy link
Owner

estruyf commented Nov 27, 2023

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

@AlbertoFdzM
Copy link
Author

@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.

estruyf added a commit that referenced this issue Apr 8, 2024
@estruyf
Copy link
Owner

estruyf commented Apr 8, 2024

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

@AlbertoFdzM
Copy link
Author

AlbertoFdzM commented Apr 9, 2024

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants