Skip to content

Commit

Permalink
🐛 integrate user editing state into related tables component
Browse files Browse the repository at this point in the history
  • Loading branch information
junkisai committed Feb 28, 2025
1 parent 42a82e8 commit 5c06c79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-baboons-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@liam-hq/erd-core": patch
---

🐛 integrate user editing state into related tables component
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useUserEditingActiveStore } from '@/stores'
import { GotoIcon, IconButton, Waypoints as WaypointsIcon } from '@liam-hq/ui'
import { type Edge, type Node, ReactFlowProvider } from '@xyflow/react'
import { type FC, type MouseEvent, useCallback } from 'react'
Expand All @@ -12,6 +13,8 @@ type Props = {
}

export const RelatedTables: FC<Props> = ({ nodes, edges, onOpenMainPane }) => {
const { tableName } = useUserEditingActiveStore()

const handleClick = useCallback(
async (event: MouseEvent) => {
event.stopPropagation()
Expand Down Expand Up @@ -42,6 +45,7 @@ export const RelatedTables: FC<Props> = ({ nodes, edges, onOpenMainPane }) => {
<div className={styles.contentWrapper}>
<ReactFlowProvider>
<ERDContent
key={tableName}
nodes={nodes}
edges={edges}
displayArea="relatedTables"
Expand Down

0 comments on commit 5c06c79

Please sign in to comment.