Skip to content

【Bug】"dropdown-cell" cell cannot be pasted correctly #1017

@uioonm

Description

@uioonm

If the cell type is "dropdown-cell" and allowedValues is set to [{label, value}] type, it cannot be copied and pasted correctly。
My configuration is as follows

{
    kind: GridCellKind.Custom,
    allowOverlay: true,
    copyData: String(value),
    data: {
        kind: "dropdown-cell",
        allowedValues: [
            { label: "110", value: "110" },
            { label: "220", value: "220" }
        ],
        value: String(value)
    }
};

When I copied 220 and pasted it into the cell, there was no response. The value obtained by onCellEdited is still the old value.
Then I tried to check the source code and found that it might be the following problem

Image

When allowedValues is an object array, onPaste cannot return the correct value,and I tried return v as the value, which successfully solved the bug

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