Skip to content

Add support for parentId as empty string ("") #17

@gmw-web

Description

@gmw-web

Somewhat related to #11 .

We have a project in which id's are represented as string. We run into problems when parentId === "" (the items are ignored/the tree is not building). We can solve the issue by replacing all empty strings by null, but this is a bit cumbersome.

Would it be possible to support empty strings in addition to null, undefined and 0?

We also noticed that there is no output (warnings/errors) in the console when tree building fails. This could help identify problems early on and would be nice to have :)

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