feat(dashboard): BulkEditor Boolean cell behaviour (#8418)
* progress * progress * add special Space behaviour for boolean cells * prevent shift clicking setting rangeEnd outside of anchor column
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { FocusEvent, MouseEvent, createContext } from "react"
|
||||
import { Control, FieldValues, Path, UseFormRegister } from "react-hook-form"
|
||||
import { CellCoords } from "./types"
|
||||
import { CellCoords, CellType } from "./types"
|
||||
|
||||
type DataGridContextType<TForm extends FieldValues> = {
|
||||
// Grid state
|
||||
anchor: CellCoords | null
|
||||
selection: Record<string, boolean>
|
||||
dragSelection: Record<string, boolean>
|
||||
trapActive: boolean
|
||||
// Cell handlers
|
||||
registerCell: (coords: CellCoords, key: string) => void
|
||||
registerCell: (coords: CellCoords, field: string, type: CellType) => void
|
||||
getIsCellSelected: (coords: CellCoords) => boolean
|
||||
getIsCellDragSelected: (coords: CellCoords) => boolean
|
||||
// Grid handlers
|
||||
setIsEditing: (value: boolean) => void
|
||||
setIsSelecting: (value: boolean) => void
|
||||
setRangeEnd: (coords: CellCoords) => void
|
||||
setSingleRange: (coords: CellCoords) => void
|
||||
// Form state and handlers
|
||||
register: UseFormRegister<TForm>
|
||||
control: Control<TForm>
|
||||
|
||||
Reference in New Issue
Block a user