Skip to content

If button tag is assigned to node.content in react.html code file for gridstack, on website [object, Object] is being rendered which is incorrect. #1822

@atharvkulkarni1998

Description

@atharvkulkarni1998

Subject of the issue

If I am assigning a "button tag" to node.content, the value being rendered on the website app is [object Object].

Your environment

Gridstack used in react application
"react": "^17.0.2",
"react-dom": "^17.0.2",

Steps to reproduce

  1. install and import Gridstack in react application.
  2. Use "react.html" file from the demo folder present on github. Make necessary changes in the react application to run the gridstack project.
  3. Navigate till function addNewWidget() and set the value of "node.content" to "button tag".
  4. Run the application and click on "add widget" button to add a widget.
  5. After the widget is added not able to view the button instead [object Object] is being displayed.

Expected behavior

After clicking on add widget, button should be rendered as the content of the widget.

Actual behavior

After clicking on add widget [object Object] is being displayed for the content part of the node.

Attachments:
image

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions