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

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

Open
uioonm opened this issue Jan 21, 2025 · 0 comments
Open

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

uioonm opened this issue Jan 21, 2025 · 0 comments

Comments

@uioonm
Copy link

uioonm commented Jan 21, 2025

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

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