mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
fix hide wrong collapsed nodes
This commit is contained in:
parent
c7475bb955
commit
bb8731e7ec
@ -133,8 +133,8 @@ export const Graph = ({ isWidget = false }: { isWidget?: boolean }) => {
|
||||
const collapsedEdges = useGraph((state) => state.collapsedEdges);
|
||||
|
||||
React.useEffect(() => {
|
||||
const nodeList = collapsedNodes.map((id) => `[id*="node-${id}"]`);
|
||||
const edgeList = collapsedEdges.map((id) => `[class*="edge-${id}"]`);
|
||||
const nodeList = collapsedNodes.map((id) => `[id$="node-${id}"]`);
|
||||
const edgeList = collapsedEdges.map((id) => `[class$="edge-${id}"]`);
|
||||
|
||||
const hiddenItems = document.querySelectorAll(".hide");
|
||||
hiddenItems.forEach((item) => item.classList.remove("hide"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user