Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding nodes based on name? #129

Open
alvaro1728 opened this issue Apr 15, 2021 · 1 comment
Open

Hiding nodes based on name? #129

alvaro1728 opened this issue Apr 15, 2021 · 1 comment

Comments

@alvaro1728
Copy link

I'd like to hide certain nodes based on their name. Is that possible without modifying the original object? For example:

  const onNodeRender = useCallback(({name, data, isNonenumerable}) => {
    if (name === "hideMe") {
       // return something that hides this node; null doesn't work -- it just shows an empty row. 
    } 
    return <ObjectLabel name={name} data={data} isNonenumerable={isNonenumerable} />;
  }, []);

Thanks,
Alvaro

@Artboomy
Copy link

Artboomy commented Jun 7, 2021

You can checkout fork that I made - https://github.com/Artboomy/react-inspector/tree/dev/feature%2Fhighlight
It has highlight and search functionality. Look for HighlightContext & SearchContext.

Disclaimer: It does modify input object by adding non-iterable symbol fields on original object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants