mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
update hooks
This commit is contained in:
1 parent
2358f40f9e
commit
0afe169abf
2 files changed
+5
-4
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import { useCallback, useMemo } from 'react'
|
||||
|
||||
import { useTableEditorFiltersSort } from 'hooks/misc/useTableEditorFiltersSort'
|
||||
import { useSafeTableEditorSnapshot } from './useSafeTableEditorSnapshot'
|
||||
import { useTableEditorTableStateSnapshot } from 'state/table-editor-table'
|
||||
|
||||
import { SELECT_COLUMN_KEY } from 'components/grid/constants'
|
||||
|
||||
// Remove dependency on useSaveTableEditorState
|
||||
@@ -15,7 +16,7 @@ import { SELECT_COLUMN_KEY } from 'components/grid/constants'
|
||||
*/
|
||||
export function useTableColumnOrder() {
|
||||
const { columnOrder, setParams } = useTableEditorFiltersSort()
|
||||
const snap = useSafeTableEditorSnapshot()
|
||||
const snap = useTableEditorTableStateSnapshot()
|
||||
|
||||
// Read current order directly from Valtio State
|
||||
const columnOrderMemo = useMemo(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useCallback, useMemo } from 'react'
|
||||
|
||||
import { useTableEditorFiltersSort } from 'hooks/misc/useTableEditorFiltersSort'
|
||||
import { useSafeTableEditorSnapshot } from './useSafeTableEditorSnapshot'
|
||||
import { useTableEditorTableStateSnapshot } from 'state/table-editor-table'
|
||||
|
||||
/**
|
||||
* Provides state and actions for managing table column visibility.
|
||||
@@ -12,7 +12,7 @@ import { useSafeTableEditorSnapshot } from './useSafeTableEditorSnapshot'
|
||||
*/
|
||||
export function useTableColumnVisibility() {
|
||||
const { setParams } = useTableEditorFiltersSort() // Only need setParams
|
||||
const snap = useSafeTableEditorSnapshot()
|
||||
const snap = useTableEditorTableStateSnapshot()
|
||||
|
||||
// Derive hidden columns Set directly from Valtio state
|
||||
const hiddenColumnsSet = useMemo(() => {
|
||||
|
||||
Reference in new issue
Block a user