@glideapps/glide-data-grid
Advanced tools
Comparing version 5.2.2-beta5 to 5.2.2-beta6
26
API.md
@@ -400,3 +400,3 @@ # Basic Usage | ||
```ts | ||
appendRow: (col: number) => Promise<void>; | ||
appendRow: (col: number, openOverlay: boolean = true) => Promise<void>; | ||
``` | ||
@@ -510,16 +510,26 @@ | ||
```ts | ||
interface EditorProps { | ||
readonly onChange: (newValue: GridCell) => void; | ||
readonly onFinishedEditing: (newValue?: GridCell) => void; | ||
export type ProvideEditorComponent<T extends InnerGridCell> = React.FunctionComponent<{ | ||
readonly onChange: (newValue: T) => void; | ||
readonly onFinishedEditing: (newValue?: T, movement?: readonly [-1 | 0 | 1, -1 | 0 | 1]) => void; | ||
readonly isHighlighted: boolean; | ||
readonly value: GridCell; | ||
} | ||
readonly value: T; | ||
readonly initialValue?: string; | ||
readonly validatedSelection?: SelectionRange; | ||
readonly imageEditorOverride?: ImageEditorType; | ||
readonly markdownDivCreateNode?: (content: string) => DocumentFragment; | ||
readonly target: Rectangle; | ||
readonly forceEditMode: boolean; | ||
readonly isValid?: boolean; | ||
}>; | ||
type ProvideEditorCallback = (cell: GridCell) => | ||
(React.FunctionComponent<EditorProps> & { | ||
export type ProvideEditorCallbackResult<T extends InnerGridCell> = | ||
| (ProvideEditorComponent<T> & { | ||
disablePadding?: boolean; | ||
disableStyling?: boolean; | ||
}) | ||
| ObjectEditorCallbackResult<T> | ||
| undefined; | ||
export type ProvideEditorCallback<T extends InnerGridCell> = (cell: T) => ProvideEditorCallbackResult<T>; | ||
provideEditor?: ProvideEditorCallback<GridCell>; | ||
@@ -526,0 +536,0 @@ ``` |
import * as React from "react"; | ||
interface Props extends React.HTMLAttributes<HTMLDivElement> { | ||
onClickOutside: () => void; | ||
isOutsideClick?: (event: MouseEvent | TouchEvent) => boolean; | ||
} | ||
@@ -5,0 +6,0 @@ export default class ClickOutsideContainer extends React.PureComponent<Props> { |
@@ -36,2 +36,3 @@ import React from "react"; | ||
baseFontStyle: string; | ||
markerFontStyle: string; | ||
fontFamily: string; | ||
@@ -38,0 +39,0 @@ editorFontSize: string; |
@@ -335,3 +335,3 @@ import * as React from "react"; | ||
* @defaultValue is | ||
{ | ||
@@ -412,2 +412,9 @@ selectAll: true, | ||
readonly scaleToRem?: boolean; | ||
/** | ||
* Custom predicate function to decide whether the click event occurred outside the grid | ||
* Especially used when custom editor is opened with the portal and is outside the grid, but there is no possibility | ||
* to add a class "click-outside-ignore" | ||
* If this function is supplied and returns false, the click event is ignored | ||
*/ | ||
readonly isOutsideClick?: (e: MouseEvent | TouchEvent) => boolean; | ||
} | ||
@@ -431,3 +438,3 @@ declare type ScrollToFn = (col: number | { | ||
*/ | ||
appendRow: (col: number, openOverlay: boolean) => Promise<void>; | ||
appendRow: (col: number, openOverlay?: boolean) => Promise<void>; | ||
/** | ||
@@ -434,0 +441,0 @@ * Triggers cells to redraw. |
@@ -23,2 +23,3 @@ import * as React from "react"; | ||
readonly validateCell?: (cell: Item, newValue: EditableGridCell, prevValue: GridCell) => boolean | ValidatedGridCell; | ||
readonly isOutsideClick?: (e: MouseEvent | TouchEvent) => boolean; | ||
} | ||
@@ -25,0 +26,0 @@ declare const DataGridOverlayEditor: React.FunctionComponent<DataGridOverlayEditorProps>; |
@@ -108,2 +108,3 @@ import type { Theme } from "../common/styles"; | ||
readonly rawEvent: React.KeyboardEvent<HTMLElement> | undefined; | ||
readonly location: Item | undefined; | ||
} | ||
@@ -339,3 +340,3 @@ interface DragHandler { | ||
readonly onChange: (newValue: T) => void; | ||
readonly onFinishedEditing: (newValue?: T) => void; | ||
readonly onFinishedEditing: (newValue?: T, movement?: readonly [-1 | 0 | 1, -1 | 0 | 1]) => void; | ||
readonly isHighlighted: boolean; | ||
@@ -342,0 +343,0 @@ readonly value: T; |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "5.2.2-beta5", | ||
"version": "5.2.2-beta6", | ||
"description": "React data grid for beautifully displaying and editing large amounts of data with amazing performance.", | ||
@@ -5,0 +5,0 @@ "sideEffects": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3070183
29193
0