Skip to content

Customize object names #339

@chromey

Description

@chromey

I'd like to have the possibility to customize what is rendered as the name of a collapsed object. For example, if I have an array with lots of objects with an identifying field such as 'id' or 'name', I'd rather display that instead of the default field count.

I have created a PR that accomplishes this with a callback "onObjectName" that can be passed as an additional option. The callback gets handed the object's path and child nodes. Returning null from the callback falls back to displaying the field count.

#338

Awesome project btw, keep going!

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