Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Multi drop down change erases values from other fields in ObjectList field #707

Open
jcclnx opened this issue Jul 25, 2024 · 0 comments
Open

Comments

@jcclnx
Copy link

jcclnx commented Jul 25, 2024

Obsidian: 1.6.7
Metadata Menu: 0.8.7
Dataview: 0.5.67
MacOS: 14.4.1

The structure of the Class fields are ObjectList > ObjectList > Multi-select and Multi-select.

Screen Shot 2024-07-24 at 10 54 00 PM

There is one value in both the "Type" and "TypeID" Multi-select dropdowns.

Screen Shot 2024-07-24 at 10 55 22 PM

Here is a view of the .md file, which shows that both fields contain a single value.

Screen Shot 2024-07-24 at 10 55 32 PM

Next, I change the "TypeID" Multi-select dropdown.

Screen Shot 2024-07-24 at 10 55 47 PM

After the values are changed, the Multi-select on the bottom "Type" now shows it's values are missing.

Screen Shot 2024-07-24 at 10 55 56 PM

This is a view of the .md file after the "TypeID" Multi-select was changed. As the model suggests, it is also missing values now. The key does not even exist.

Screen Shot 2024-07-24 at 10 56 11 PM

Here are a few other things I am noticing.

• The Type and TypeID fields are not displayed in the model or .md file in the same order they are in the Class file.
• The Multi-select field that is first in the list seems to wipe out the values of the Multi-select below it.
• Switching the order of the Multi-selects just changes which one gets wiped out. The top always seems to wipe out the bottom
• Clicking add missing fields on an object under Controls > SubControls > wipes out all other objects under SubControls if they are lower in the list. For example, if there are three objects and I click add missing fields to the 3rd, it does not wipe out 1-2. If I were to do it on 2, it would wipe out 3, and if I were to add the missing fields to 1, it would wipe out 2 and 3.
• This issue is repeatable in both the tab icon menu and the note's field property icon menu.
• Adding a new object to Controls > SubControls > ObjectList adds the object with index 0 instead of the last index+1. This causes the new object to be first in the list. Adding the missing fields to object[0] wipes out all other objects below. Manually setting a value in any of the Multi-select fields will also wipe out any of the objects below in the ObjectList.

Here is the Class file TestClass.md.

---
fields:
  - name: Controls
    type: ObjectList
    options:
      displayTemplate: ""
      itemDisplayTemplate: ""
    path: ""
    id: sSAobx
  - name: ID
    type: Number
    options: {}
    path: sSAobx
    id: YsUkS6
  - name: Name
    type: Input
    options: {}
    path: sSAobx
    id: h3b032
  - name: SubControls
    type: ObjectList
    options:
      displayTemplate: ""
      itemDisplayTemplate: ""
    path: sSAobx
    id: Z2h3JX
  - name: ID
    type: Number
    options: {}
    path: sSAobx____Z2h3JX
    id: 9RhfA0
  - name: Name
    type: Input
    options: {}
    path: sSAobx____Z2h3JX
    id: xkehyT
  - name: Type
    type: Multi
    options:
      sourceType: ValuesList
      valuesList:
        "1": Review
        "2": Observation
        "3": Population
        "4": Validation
    path: sSAobx____Z2h3JX
    id: y5xLfo
    display: asList
  - name: TypeID
    type: Multi
    options:
      sourceType: ValuesList
      valuesList:
        "1": R
        "2": O
        "3": P
        "4": V
    path: sSAobx____Z2h3JX
    id: xp8Sfx
    display: asList
version: "2.78"
limit: 20
mapWithTag: false
icon: package
tagNames: 
filesPaths: 
bookmarksGroups: 
excludes: 
extends: 
savedViews: []
favoriteView: 
fieldsOrder:
  - sSAobx
  - YsUkS6
  - h3b032
  - Z2h3JX
  - 9RhfA0
  - xkehyT
  - y5xLfo
  - xp8Sfx
---

Here is an example note.

---
FileClass: TestClass
Controls: 
  - ID: 1
    Name: Name 1
    SubControls: 
      - ID: 1
        Name: Name 1.1
        Type:
          - Population
        TypeID:
          - P 
      - ID: 2
        Name: Name 1.2
        Type:
          - Population
        TypeID:
          - P
  - ID: 2
    Name: Name 2
    SubControls: 
      - ID: 1
        Name: Name 2.1
        Type:
          - Population
        TypeID:
          - P 
      - ID: 2
        Name: Name 2.2
        Type:
          - Population
        TypeID:
          - P
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant