-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: Fixed an issue where the correct table was not focused when sharing URLs in TableDetail #275
Conversation
…r layout management
…ing URLs in TableDetail
896111e
to
19e499a
Compare
const visibleNodes: Node[] = nodes.filter((node) => !node.hidden) | ||
const hiddenNodes: Node[] = nodes.filter((node) => node.hidden) | ||
const handleLayout = useCallback( | ||
async (fitViewOptions?: FitViewOptions) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 It is only possible to pass fitViewOptions.
const tableName = urlParams.get(activeQueryParam) | ||
|
||
return tableName || undefined | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 The contents of useActiveTableNameFromUrl()
have been brought in.
const tableNameFromUrl = getActiveTableNameFromUrl() | ||
updateActiveTableName(tableNameFromUrl) | ||
const fitViewOptions = tableNameFromUrl | ||
? { maxZoom: 1, duration: 300, nodes: [{ id: tableNameFromUrl }] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 same as useFitViewWhenActiveTableChange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
2024-12-16.21.13.30.mov
ref: https://liam-erd-sample-5rp1jfv9b-route-06-core.vercel.app/?active=account_statuses_cleanup_policies