Skip to content

Label title uses the node text which renders [Object object] when using a React component to render the name #63

Open
@maddox

Description

@maddox

When passing a react object for the name of the node to get special rendering, the component uses it for the hover title. This render [Object object].

It would be nice if it just didn't render this at all if the nodeText was NOT a string. Or, if we could pass our own value for the title hover text.

Example

    {
      name: (
      <>
        {setting.name}
        <OverlayTrigger placement="top" overlay={<Tooltip id={`tooltip-issue`}>{setting.description}</Tooltip>}>
          <FontAwesomeIcon icon={faInfoCircle} className="ml-2" />
        </OverlayTrigger>
      </>
    ),
    id: setting.settingKey,
  }

Code Location

https://github.com/azizali/react-super-treeview/blob/master/src/index.js#L234-L238

  <label
      htmlFor={node.id}
      title={nodeText}
      className="super-treeview-text"
  >

https://github.com/azizali/react-super-treeview/blob/master/src/index.js#L234-L238

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