@react-spectrum/table 3.16.1 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DragPreview.main.js +1 -1
- package/dist/DragPreview.main.js.map +1 -1
- package/dist/DragPreview.mjs +1 -1
- package/dist/DragPreview.module.js +1 -1
- package/dist/DragPreview.module.js.map +1 -1
- package/dist/InsertionIndicator.main.js.map +1 -1
- package/dist/InsertionIndicator.module.js.map +1 -1
- package/dist/Nubbin.main.js.map +1 -1
- package/dist/Nubbin.module.js.map +1 -1
- package/dist/Resizer.main.js +2 -2
- package/dist/Resizer.main.js.map +1 -1
- package/dist/Resizer.mjs +3 -3
- package/dist/Resizer.module.js +3 -3
- package/dist/Resizer.module.js.map +1 -1
- package/dist/RootDropIndicator.main.js.map +1 -1
- package/dist/RootDropIndicator.module.js.map +1 -1
- package/dist/TableViewBase.main.js +4 -2
- package/dist/TableViewBase.main.js.map +1 -1
- package/dist/TableViewBase.mjs +4 -2
- package/dist/TableViewBase.module.js +4 -2
- package/dist/TableViewBase.module.js.map +1 -1
- package/dist/TableViewLayout.main.js +2 -1
- package/dist/TableViewLayout.main.js.map +1 -1
- package/dist/TableViewLayout.mjs +2 -1
- package/dist/TableViewLayout.module.js +2 -1
- package/dist/TableViewLayout.module.js.map +1 -1
- package/dist/es-ES.main.js +2 -2
- package/dist/es-ES.main.js.map +1 -1
- package/dist/es-ES.mjs +2 -2
- package/dist/es-ES.module.js +2 -2
- package/dist/es-ES.module.js.map +1 -1
- package/dist/{vars.27f08d5f.css → table.0cdc494a.css} +1 -1
- package/dist/{vars.27f08d5f.css.map → table.0cdc494a.css.map} +1 -1
- package/package.json +27 -27
- package/src/DragPreview.tsx +2 -2
- package/src/InsertionIndicator.tsx +2 -2
- package/src/Nubbin.tsx +2 -2
- package/src/Resizer.tsx +3 -3
- package/src/RootDropIndicator.tsx +2 -2
- package/src/TableViewBase.tsx +11 -4
- package/src/TableViewLayout.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;;;;;AAQA;;;;AAMF;;;;;;;;;AAQA;;;;;;;;AAQA;;;;AAIA;;;;AAOE;;;;;;;AAWF;;;;;;;;;AAWE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAMJ;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;;;AAQE;;;;;;;AAQF;;;;;;;;;;;AAgBA;;;;;;;;;;;AAWI;;;;AAGA;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;AAKE;;;;AAQE;;;;;;;;AAJF;;;;AAIE;;;;;;;;AAiBJ;;;;;AAKA;;;;;;;;AAQA;;;;;;;;AAQA;;;;;;;;AAQA;;;;;;;;AAYI;;;;;;;AASJ;;;;AAIA;;;;;;AAKE;;;;AAIA;;;;AAME;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAWA;;;;;AAUE;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAWA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AASE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAMA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAWR;;;;AAIA;;;;AAKE;;;;;AAKA;;;;AAOI;;;;AAON;;;;;;;AAQE;;;;AAKF;;;;AAIA;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAQE;;;;AAKF;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;AAKF;EAMM;;;;;;;;AAsBN;;;;;;;;;;AAUA;;;;;;AASA;;;;;;AAUI;;;;AAIA;;;;AAGE;;;;AAKF;;;;AAIE;;;;AAJF;;;;AAIE;;;;AAKF;;;;AAGE;;;;AAxBF;;;;AAIA;;;;AAGE;;;;AAKF;;;;AAIE;;;;AAJF;;;;AAIE;;;;AAKF;;;;AAGE;;;;AASN;;;;;AAIE;;;;AAUE;;;;;AASJ;;;;;;AAMI;;;;;;;;;;AAWF;;;;;AAIE;;;;AASJ;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAIA;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;AAIA;;;;AAIA;;;;AAQF;;;;;AASF;;;;AAOE;;;;AAOF;;;;AAOE;;;;;AAIA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;AAUA;;;;;;;;;AAYA;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;AAQA;;;;;;;;;;;;;AAYE;;;;AAME;;;;;AAQA;;;;AAIF;;;;AAEE;;;;;AAIA;;;;;;;AAWJ;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;;;;;AAQA;;;;AAMF;;;;;;;;;AAQA;;;;;;;;AAQA;;;;AAIA;;;;AAOE;;;;;;;AAWF;;;;;;;;;AAWE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAMJ;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;;;AAQE;;;;;;;AAQF;;;;;;;;;;;AAgBA;;;;;;;;;;;AAWI;;;;AAGA;;;;AAMJ;;;;;AAKA;;;;AAIA;;;;AAKE;;;;AAQE;;;;;;;;AAJF;;;;AAIE;;;;;;;;AAiBJ;;;;;AAKA;;;;;;;;AAQA;;;;;;;;AAQA;;;;;;;;AAQA;;;;;;;;AAYI;;;;;;;AASJ;;;;AAIA;;;;;;AAKE;;;;AAIA;;;;AAME;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAWA;;;;;AAUE;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAWA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AASE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAMA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUA;;;;;AAAA;;;;;AAAA;;;;;AAAA;;;;;AAWR;;;;AAIA;;;;AAKE;;;;;AAKA;;;;AAOI;;;;AAON;;;;;;;AAQE;;;;AAKF;;;;AAIA;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAQE;;;;AAKF;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAUE;;;;AAKF;EAMM;;;;;;;;AAsBN;;;;;;;;;;AAUA;;;;;;AASA;;;;;;AAUI;;;;AAIA;;;;AAGE;;;;AAKF;;;;AAIE;;;;AAJF;;;;AAIE;;;;AAKF;;;;AAGE;;;;AAxBF;;;;AAIA;;;;AAGE;;;;AAKF;;;;AAIE;;;;AAJF;;;;AAIE;;;;AAKF;;;;AAGE;;;;AASN;;;;;AAIE;;;;AAUE;;;;;AASJ;;;;;;AAMI;;;;;;;;;;AAWF;;;;;AAIE;;;;AASJ;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAKF;;;;AAGE;;;;AAQA;;;;AAUE;;;;AAKF;;;;AAIA;;;;AAYA;;;;;;;;;;;AAkBE;;;;AAMA;;;;AAIA;;;;AAKA;;;;AAMA;;;;AAUE;;;;AAOF;;;;;;AAUJ;;;;;AAKA;;;;;AAME;;;;;AAIE;;;;;AAIE;;;;AAOF;;;;AAIA;;;;AASA;;;;AAKE;;;;AAIA;;;;AAIA;;;;AAQF;;;;;AASF;;;;AAOE;;;;AAOF;;;;AAOE;;;;;AAIA;;;;;AAOJ;;;;AAIA;EACE;;;;;;;;;;;;;;;;EAkBI;;;;EASA","sources":["packages/@adobe/spectrum-css-temp/components/table/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"table.0cdc494a.css.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/table",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,31 +36,31 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "^3.
|
|
40
|
-
"@react-aria/focus": "^3.20.
|
|
41
|
-
"@react-aria/i18n": "^3.12.
|
|
42
|
-
"@react-aria/interactions": "^3.
|
|
43
|
-
"@react-aria/overlays": "^3.
|
|
44
|
-
"@react-aria/selection": "^3.
|
|
45
|
-
"@react-aria/table": "^3.17.
|
|
46
|
-
"@react-aria/utils": "^3.28.
|
|
47
|
-
"@react-aria/virtualizer": "^4.1.
|
|
48
|
-
"@react-aria/visually-hidden": "^3.8.
|
|
49
|
-
"@react-spectrum/checkbox": "^3.9.
|
|
50
|
-
"@react-spectrum/dnd": "^3.5.
|
|
51
|
-
"@react-spectrum/layout": "^3.6.
|
|
52
|
-
"@react-spectrum/menu": "^3.
|
|
53
|
-
"@react-spectrum/progress": "^3.7.
|
|
54
|
-
"@react-spectrum/tooltip": "^3.7.
|
|
55
|
-
"@react-spectrum/utils": "^3.12.
|
|
56
|
-
"@react-stately/flags": "^3.1.
|
|
57
|
-
"@react-stately/layout": "^4.2.
|
|
58
|
-
"@react-stately/table": "^3.14.
|
|
59
|
-
"@react-stately/virtualizer": "^4.3.
|
|
60
|
-
"@react-types/grid": "^3.3.
|
|
61
|
-
"@react-types/shared": "^3.
|
|
62
|
-
"@react-types/table": "^3.
|
|
63
|
-
"@spectrum-icons/ui": "^3.6.
|
|
39
|
+
"@react-aria/button": "^3.13.0",
|
|
40
|
+
"@react-aria/focus": "^3.20.2",
|
|
41
|
+
"@react-aria/i18n": "^3.12.8",
|
|
42
|
+
"@react-aria/interactions": "^3.25.0",
|
|
43
|
+
"@react-aria/overlays": "^3.27.0",
|
|
44
|
+
"@react-aria/selection": "^3.24.0",
|
|
45
|
+
"@react-aria/table": "^3.17.2",
|
|
46
|
+
"@react-aria/utils": "^3.28.2",
|
|
47
|
+
"@react-aria/virtualizer": "^4.1.4",
|
|
48
|
+
"@react-aria/visually-hidden": "^3.8.22",
|
|
49
|
+
"@react-spectrum/checkbox": "^3.9.15",
|
|
50
|
+
"@react-spectrum/dnd": "^3.5.4",
|
|
51
|
+
"@react-spectrum/layout": "^3.6.14",
|
|
52
|
+
"@react-spectrum/menu": "^3.22.0",
|
|
53
|
+
"@react-spectrum/progress": "^3.7.15",
|
|
54
|
+
"@react-spectrum/tooltip": "^3.7.4",
|
|
55
|
+
"@react-spectrum/utils": "^3.12.4",
|
|
56
|
+
"@react-stately/flags": "^3.1.1",
|
|
57
|
+
"@react-stately/layout": "^4.2.2",
|
|
58
|
+
"@react-stately/table": "^3.14.1",
|
|
59
|
+
"@react-stately/virtualizer": "^4.3.2",
|
|
60
|
+
"@react-types/grid": "^3.3.1",
|
|
61
|
+
"@react-types/shared": "^3.29.0",
|
|
62
|
+
"@react-types/table": "^3.12.0",
|
|
63
|
+
"@spectrum-icons/ui": "^3.6.15",
|
|
64
64
|
"@swc/helpers": "^0.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
|
|
80
80
|
}
|
package/src/DragPreview.tsx
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import {classNames} from '@react-spectrum/utils';
|
|
14
14
|
import {Flex} from '@react-spectrum/layout';
|
|
15
|
-
import React from 'react';
|
|
15
|
+
import React, {ReactNode} from 'react';
|
|
16
16
|
import styles from '@adobe/spectrum-css-temp/components/table/vars.css';
|
|
17
17
|
import stylesOverrides from './table.css';
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ interface DragPreviewProps {
|
|
|
23
23
|
maxWidth: number
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export function DragPreview(props: DragPreviewProps) {
|
|
26
|
+
export function DragPreview(props: DragPreviewProps): ReactNode {
|
|
27
27
|
let {
|
|
28
28
|
itemText,
|
|
29
29
|
itemCount,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import {classNames} from '@react-spectrum/utils';
|
|
14
14
|
import {FocusableElement, ItemDropTarget} from '@react-types/shared';
|
|
15
|
-
import React, {DOMAttributes, HTMLAttributes, useRef} from 'react';
|
|
15
|
+
import React, {DOMAttributes, HTMLAttributes, ReactNode, useRef} from 'react';
|
|
16
16
|
import styles from './table.css';
|
|
17
17
|
import {useTableContext} from './TableViewBase';
|
|
18
18
|
import {useVisuallyHidden} from '@react-aria/visually-hidden';
|
|
@@ -22,7 +22,7 @@ interface InsertionIndicatorProps {
|
|
|
22
22
|
rowProps: HTMLAttributes<HTMLElement> & DOMAttributes<FocusableElement>
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function InsertionIndicator(props: InsertionIndicatorProps) {
|
|
25
|
+
export function InsertionIndicator(props: InsertionIndicatorProps): ReactNode | null {
|
|
26
26
|
let {dropState, dragAndDropHooks} = useTableContext();
|
|
27
27
|
const {target, rowProps} = props;
|
|
28
28
|
|
package/src/Nubbin.tsx
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import React from 'react';
|
|
13
|
+
import React, {ReactNode} from 'react';
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// TODO resize with scale? colors should be variables
|
|
17
|
-
export function Nubbin() {
|
|
17
|
+
export function Nubbin(): ReactNode {
|
|
18
18
|
return (
|
|
19
19
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
20
20
|
<g fill="var(--spectrum-global-color-blue-600)" stroke="var(--spectrum-global-color-blue-600)" strokeWidth="2">
|
package/src/Resizer.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import {classNames} from '@react-spectrum/utils';
|
|
3
3
|
import {ColumnSize} from '@react-types/table';
|
|
4
4
|
import eCursor from 'bundle-text:./cursors/Cur_MoveToRight_9_9.svg';
|
|
@@ -16,7 +16,7 @@ import {TableColumnResizeState} from '@react-stately/table';
|
|
|
16
16
|
import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';
|
|
17
17
|
import {useTableColumnResize} from '@react-aria/table';
|
|
18
18
|
import {useTableContext, useVirtualizerContext} from './TableViewBase';
|
|
19
|
-
import {
|
|
19
|
+
import {useUNSAFE_PortalContext} from '@react-aria/overlays';
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import wCursor from 'bundle-text:./cursors/Cur_MoveToLeft_9_9.svg';
|
|
22
22
|
|
|
@@ -132,6 +132,6 @@ export const Resizer = React.forwardRef(function Resizer<T>(props: ResizerProps<
|
|
|
132
132
|
|
|
133
133
|
function CursorOverlay(props) {
|
|
134
134
|
let {show, children} = props;
|
|
135
|
-
let {getContainer} =
|
|
135
|
+
let {getContainer} = useUNSAFE_PortalContext();
|
|
136
136
|
return show ? ReactDOM.createPortal(children, getContainer?.() ?? document.body) : null;
|
|
137
137
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import React, {useRef} from 'react';
|
|
13
|
+
import React, {ReactNode, useRef} from 'react';
|
|
14
14
|
import {useTableContext} from './TableViewBase';
|
|
15
15
|
import {useVisuallyHidden} from '@react-aria/visually-hidden';
|
|
16
16
|
|
|
17
|
-
export function RootDropIndicator() {
|
|
17
|
+
export function RootDropIndicator(): ReactNode | null {
|
|
18
18
|
let {dropState, dragAndDropHooks, state} = useTableContext();
|
|
19
19
|
let ref = useRef<HTMLDivElement | null>(null);
|
|
20
20
|
let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!({
|
package/src/TableViewBase.tsx
CHANGED
|
@@ -128,12 +128,15 @@ export interface TableContextValue<T> {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export const TableContext = React.createContext<TableContextValue<unknown> | null>(null);
|
|
131
|
-
export function useTableContext() {
|
|
131
|
+
export function useTableContext(): TableContextValue<unknown> {
|
|
132
132
|
return useContext(TableContext)!;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export const VirtualizerContext = React.createContext<{width: number, key: Key | null} | null>(null);
|
|
136
|
-
export function useVirtualizerContext() {
|
|
136
|
+
export function useVirtualizerContext(): {
|
|
137
|
+
width: number,
|
|
138
|
+
key: Key | null
|
|
139
|
+
} | null {
|
|
137
140
|
return useContext(VirtualizerContext);
|
|
138
141
|
}
|
|
139
142
|
|
|
@@ -158,6 +161,9 @@ function TableViewBase<T extends object>(props: TableBaseProps<T>, ref: DOMRef<H
|
|
|
158
161
|
let dragHooksProvided = useRef(isTableDraggable);
|
|
159
162
|
let dropHooksProvided = useRef(isTableDroppable);
|
|
160
163
|
useEffect(() => {
|
|
164
|
+
if (process.env.NODE_ENV === 'production') {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
161
167
|
if (dragHooksProvided.current !== isTableDraggable) {
|
|
162
168
|
console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
163
169
|
}
|
|
@@ -748,7 +754,7 @@ function TableColumnHeader(props) {
|
|
|
748
754
|
let {pressProps, isPressed} = usePress({isDisabled: isEmpty});
|
|
749
755
|
let columnProps = column.props as SpectrumColumnProps<unknown>;
|
|
750
756
|
useEffect(() => {
|
|
751
|
-
if (column.hasChildNodes && columnProps.allowsResizing) {
|
|
757
|
+
if (column.hasChildNodes && columnProps.allowsResizing && process.env.NODE_ENV !== 'production') {
|
|
752
758
|
console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
|
|
753
759
|
}
|
|
754
760
|
}, [column.hasChildNodes, column.key, columnProps.allowsResizing]);
|
|
@@ -1044,6 +1050,7 @@ function TableSelectAllCell({column}) {
|
|
|
1044
1050
|
}
|
|
1045
1051
|
<Checkbox
|
|
1046
1052
|
{...checkboxProps}
|
|
1053
|
+
data-testid="selectAll"
|
|
1047
1054
|
isEmphasized
|
|
1048
1055
|
UNSAFE_style={isSingleSelectionMode ? {visibility: 'hidden'} : undefined}
|
|
1049
1056
|
UNSAFE_className={classNames(styles, 'spectrum-Table-checkbox')} />
|
|
@@ -1128,7 +1135,7 @@ interface TableRowContextValue {
|
|
|
1128
1135
|
|
|
1129
1136
|
|
|
1130
1137
|
const TableRowContext = React.createContext<TableRowContextValue | null>(null);
|
|
1131
|
-
export function useTableRowContext() {
|
|
1138
|
+
export function useTableRowContext(): TableRowContextValue {
|
|
1132
1139
|
return useContext(TableRowContext)!;
|
|
1133
1140
|
}
|
|
1134
1141
|
|
package/src/TableViewLayout.ts
CHANGED
|
@@ -89,8 +89,8 @@ export class TableViewLayout<T> extends TableLayout<T> {
|
|
|
89
89
|
return super.getEstimatedRowHeight() + 1; // for bottom border
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
protected isStickyColumn(node: GridNode<T>) {
|
|
93
|
-
return node.props?.isDragButtonCell || node.props?.isSelectionCell;
|
|
92
|
+
protected isStickyColumn(node: GridNode<T>): boolean {
|
|
93
|
+
return (node.props?.isDragButtonCell || node.props?.isSelectionCell) ?? false;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
getDropTargetFromPoint(x: number, y: number, isValidDropTarget: (target: DropTarget) => boolean): DropTarget | null {
|