react-inspector
react-inspector copied to clipboard
Hiding nodes based on name?
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
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.