Skip to content

[Bug] Drag-and-drop on board view writes to "[object Object]" frontmatter key instead of the grouped property name #558

Description

@Ju4n5e

Description

When dragging a card between columns on a board view (list view grouped by a property like Status), the property value is written to a corrupted YAML frontmatter key literally named "[object Object]" instead of the actual property name (e.g., Status). The original property is never updated, so the card appears to snap back to its original column.

Steps to reproduce

  1. Create a folder with notes that have a Status frontmatter property (e.g., Not Started, In Progress, Done)
  2. Set up a board view grouped by Status
  3. Drag a card from one column to another
  4. Open the file in source mode

Expected: Status property updates to the new column's value
Actual: Status is unchanged; a new key "[object Object]" appears with the intended value:

---
Status: Not Started
"[object Object]": In Progress
---

Root cause

In the drag-and-drop end handler (TSt in the bundled main.js), the _groupField prop is a column descriptor object (e.g., {name: "Status", type: "option", ...}), not a string. When used as a computed property key:

ma(r.superstate, a, {[r.props?._groupField]: r.props?._groupValue})

JavaScript calls .toString() on the object, producing "[object Object]".

The same issue occurs in the second branch where _groupField is passed to o0e and used as [i]: a.

Interestingly, the plugin's own template expressions for the "New Item" button correctly extract .name:

group: "$root.props['_groupField']?.name"

Fix

Extract .name from the field object before using it as a key:

// Site 1: ma call
ma(r.superstate, a, {[r.props?._groupField?.name]: r.props?._groupValue})

// Site 2: o0e call argument
r.props?._groupField?.name

Environment

  • Make.md version: 1.3.5
  • Obsidian version: 1.8.x
  • OS: macOS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions