Skip to content

Droppable Passing a JSON structure #6

@nfplay

Description

@nfplay

Hi, what's the current recommended way of passing a json structure in a droppable?

Is it through DataToOffer passing the structure in stringified format like this:

use:asDroppable={{
        Extras: "Text",
        relativeTo: "body",
        Operations: "copy",
        DataToOffer: {
          "application/json": '{"type": "custom", "name": "SQL Server"}'
        },
        onDropped,
      }}

And then use JSON.parse() on the "application/json" key once the droppable is dropped?
Is there some better way to do this?

Thanks,
Nuno

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions