@atlaskit/editor-plugin-table 7.3.0 → 7.3.1

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/commands/misc.js +4 -2
  4. package/dist/cjs/commands/selection.js +4 -2
  5. package/dist/cjs/pm-plugins/drag-and-drop/commands.js +3 -1
  6. package/dist/cjs/pm-plugins/drag-and-drop/plugin.js +33 -1
  7. package/dist/cjs/pm-plugins/drag-and-drop/reducer.js +2 -1
  8. package/dist/cjs/pm-plugins/table-selection-keymap.js +2 -2
  9. package/dist/cjs/ui/DragHandle/HandleIconComponent.js +1 -3
  10. package/dist/cjs/ui/DragHandle/index.js +22 -10
  11. package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +75 -33
  12. package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +123 -0
  13. package/dist/cjs/ui/FloatingDragMenu/index.js +2 -2
  14. package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +24 -35
  15. package/dist/cjs/ui/TableFloatingColumnControls/index.js +1 -2
  16. package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +4 -0
  17. package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +26 -33
  18. package/dist/cjs/ui/common-styles.js +1 -1
  19. package/dist/cjs/ui/consts.js +3 -2
  20. package/dist/es2019/commands/misc.js +4 -4
  21. package/dist/es2019/commands/selection.js +4 -4
  22. package/dist/es2019/pm-plugins/drag-and-drop/commands.js +3 -3
  23. package/dist/es2019/pm-plugins/drag-and-drop/plugin.js +34 -1
  24. package/dist/es2019/pm-plugins/drag-and-drop/reducer.js +2 -1
  25. package/dist/es2019/pm-plugins/table-selection-keymap.js +2 -2
  26. package/dist/es2019/ui/DragHandle/HandleIconComponent.js +1 -3
  27. package/dist/es2019/ui/DragHandle/index.js +25 -10
  28. package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +72 -32
  29. package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +109 -0
  30. package/dist/es2019/ui/FloatingDragMenu/index.js +2 -2
  31. package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +24 -35
  32. package/dist/es2019/ui/TableFloatingColumnControls/index.js +1 -2
  33. package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +4 -0
  34. package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +26 -33
  35. package/dist/es2019/ui/common-styles.js +11 -1
  36. package/dist/es2019/ui/consts.js +2 -1
  37. package/dist/esm/commands/misc.js +4 -2
  38. package/dist/esm/commands/selection.js +4 -2
  39. package/dist/esm/pm-plugins/drag-and-drop/commands.js +3 -2
  40. package/dist/esm/pm-plugins/drag-and-drop/plugin.js +33 -1
  41. package/dist/esm/pm-plugins/drag-and-drop/reducer.js +2 -1
  42. package/dist/esm/pm-plugins/table-selection-keymap.js +2 -2
  43. package/dist/esm/ui/DragHandle/HandleIconComponent.js +1 -3
  44. package/dist/esm/ui/DragHandle/index.js +21 -9
  45. package/dist/esm/ui/FloatingDragMenu/DragMenu.js +74 -35
  46. package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +116 -0
  47. package/dist/esm/ui/FloatingDragMenu/index.js +2 -2
  48. package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +24 -35
  49. package/dist/esm/ui/TableFloatingColumnControls/index.js +1 -2
  50. package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +4 -0
  51. package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +26 -33
  52. package/dist/esm/ui/common-styles.js +1 -1
  53. package/dist/esm/ui/consts.js +2 -1
  54. package/dist/types/commands/misc.d.ts +2 -2
  55. package/dist/types/commands/selection.d.ts +2 -2
  56. package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +1 -0
  57. package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +2 -1
  58. package/dist/types/pm-plugins/drag-and-drop/types.d.ts +2 -0
  59. package/dist/types/ui/DragHandle/HandleIconComponent.d.ts +1 -2
  60. package/dist/types/ui/DragHandle/index.d.ts +3 -2
  61. package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +7 -8
  62. package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +30 -0
  63. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -2
  64. package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  65. package/dist/types/ui/consts.d.ts +1 -0
  66. package/dist/types-ts4.5/commands/misc.d.ts +2 -2
  67. package/dist/types-ts4.5/commands/selection.d.ts +2 -2
  68. package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +1 -0
  69. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +2 -1
  70. package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +2 -0
  71. package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +1 -2
  72. package/dist/types-ts4.5/ui/DragHandle/index.d.ts +3 -2
  73. package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +7 -8
  74. package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +30 -0
  75. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -2
  76. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  77. package/dist/types-ts4.5/ui/consts.d.ts +1 -0
  78. package/package.json +3 -2
  79. package/src/commands/misc.ts +17 -4
  80. package/src/commands/selection.ts +12 -4
  81. package/src/pm-plugins/drag-and-drop/actions.ts +1 -0
  82. package/src/pm-plugins/drag-and-drop/commands.ts +3 -0
  83. package/src/pm-plugins/drag-and-drop/plugin.ts +47 -0
  84. package/src/pm-plugins/drag-and-drop/reducer.ts +1 -0
  85. package/src/pm-plugins/drag-and-drop/types.ts +3 -0
  86. package/src/pm-plugins/table-selection-keymap.ts +2 -2
  87. package/src/ui/DragHandle/HandleIconComponent.tsx +2 -9
  88. package/src/ui/DragHandle/index.tsx +37 -16
  89. package/src/ui/FloatingDragMenu/DragMenu.tsx +362 -310
  90. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +150 -0
  91. package/src/ui/FloatingDragMenu/index.tsx +3 -3
  92. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +72 -91
  93. package/src/ui/TableFloatingColumnControls/index.tsx +1 -2
  94. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +5 -0
  95. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +89 -104
  96. package/src/ui/common-styles.ts +11 -1
  97. package/src/ui/consts.ts +1 -0
  98. package/tsconfig.app.json +3 -0
@@ -0,0 +1,150 @@
1
+ import React from 'react';
2
+
3
+ import { DropList } from '@atlaskit/editor-common/ui';
4
+ import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
5
+ import {
6
+ ArrowKeyNavigationProvider,
7
+ ArrowKeyNavigationType,
8
+ DropdownMenuItem,
9
+ } from '@atlaskit/editor-common/ui-menu';
10
+ import { withReactEditorViewOuterListeners } from '@atlaskit/editor-common/ui-react';
11
+ import { MenuGroup, Section } from '@atlaskit/menu';
12
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
+
14
+ import { dragMenuDropdownWidth } from '../consts';
15
+
16
+ const DropListWithOutsideListeners =
17
+ withReactEditorViewOuterListeners(DropList);
18
+
19
+ type DropdownMenuProps = {
20
+ target?: HTMLElement;
21
+ items: Array<{
22
+ items: MenuItem[];
23
+ }>;
24
+ /**
25
+ * use to toggle top level menu keyboard navigation and action keys
26
+ * e.g. should be false if submenu is rendered as a child to avoid multiple keydown handlers
27
+ */
28
+ disableKeyboardHandling: boolean;
29
+ section: { hasSeparator?: boolean; title?: string };
30
+ onItemActivated?: (attrs: {
31
+ item: MenuItem;
32
+ shouldCloseMenu?: boolean;
33
+ }) => void;
34
+ handleClose: (focusTarget: 'editor' | 'handle') => void;
35
+ onMouseEnter: (attrs: { item: MenuItem }) => void;
36
+ onMouseLeave: (attrs: { item: MenuItem }) => void;
37
+ };
38
+
39
+ export const DropdownMenu = ({
40
+ target,
41
+ items,
42
+ section,
43
+ disableKeyboardHandling,
44
+ onItemActivated,
45
+ handleClose,
46
+ onMouseEnter,
47
+ onMouseLeave,
48
+ }: DropdownMenuProps) => {
49
+ const innerMenu = () => {
50
+ return (
51
+ <DropListWithOutsideListeners
52
+ isOpen
53
+ shouldFitContainer
54
+ position={['bottom', 'left'].join(' ')}
55
+ handleClickOutside={() => handleClose('editor')}
56
+ handleEscapeKeydown={() => {
57
+ if (!disableKeyboardHandling) {
58
+ handleClose('handle');
59
+ }
60
+ }}
61
+ handleEnterKeydown={(e: KeyboardEvent) => {
62
+ if (!disableKeyboardHandling) {
63
+ e.preventDefault();
64
+ e.stopPropagation();
65
+ }
66
+ }}
67
+ targetRef={target}
68
+ >
69
+ <div style={{ height: 0, minWidth: dragMenuDropdownWidth }} />
70
+ <MenuGroup role="menu">
71
+ {items.map((group, index) => (
72
+ <Section
73
+ hasSeparator={section?.hasSeparator && index > 0}
74
+ title={section?.title}
75
+ key={index}
76
+ >
77
+ {group.items.map((item) => (
78
+ <DropdownMenuItem
79
+ shouldUseDefaultRole={false}
80
+ key={item.key ?? String(item.content)}
81
+ item={item}
82
+ onItemActivated={onItemActivated}
83
+ onMouseEnter={onMouseEnter}
84
+ onMouseLeave={onMouseLeave}
85
+ />
86
+ ))}
87
+ </Section>
88
+ ))}
89
+ </MenuGroup>
90
+ </DropListWithOutsideListeners>
91
+ );
92
+ };
93
+
94
+ if (disableKeyboardHandling) {
95
+ return innerMenu();
96
+ }
97
+
98
+ return (
99
+ <ArrowKeyNavigationProvider
100
+ closeOnTab
101
+ type={ArrowKeyNavigationType.MENU}
102
+ onSelection={(index) => {
103
+ const results = items.flatMap((item) =>
104
+ 'items' in item ? item.items : item,
105
+ );
106
+
107
+ // onSelection is called when any focusable element is 'activated'
108
+ // this is an issue as some menu items have toggles, which cause the index value
109
+ // in the callback to be outside of array length.
110
+ // The logic below normalises the index value based on the number
111
+ // of menu items with 2 focusable elements, and adjusts the index to ensure
112
+ // the correct menu item is sent in onItemActivated callback
113
+ if (
114
+ getBooleanFF('platform.editor.table.new-cell-context-menu-styling')
115
+ ) {
116
+ const keys = ['row_numbers', 'header_row', 'header_column'];
117
+ let doubleItemCount = 0;
118
+
119
+ const firstIndex = results.findIndex((value) =>
120
+ keys.includes(value.key!),
121
+ );
122
+
123
+ if (firstIndex === -1 || index <= firstIndex) {
124
+ onItemActivated && onItemActivated({ item: results[index] });
125
+ return;
126
+ }
127
+
128
+ for (let i = firstIndex; i < results.length; i += 1) {
129
+ if (keys.includes(results[i].key!)) {
130
+ doubleItemCount += 1;
131
+ }
132
+ if (firstIndex % 2 === 0 && index - doubleItemCount === i) {
133
+ onItemActivated && onItemActivated({ item: results[i] });
134
+ return;
135
+ }
136
+
137
+ if (firstIndex % 2 === 1 && index - doubleItemCount === i) {
138
+ onItemActivated && onItemActivated({ item: results[i] });
139
+ return;
140
+ }
141
+ }
142
+ } else {
143
+ onItemActivated && onItemActivated({ item: results[index] });
144
+ }
145
+ }}
146
+ >
147
+ {innerMenu()}
148
+ </ArrowKeyNavigationProvider>
149
+ );
150
+ };
@@ -63,6 +63,8 @@ const FloatingDragMenu = ({
63
63
  ? document.querySelector('#drag-handle-button-row')
64
64
  : document.querySelector('#drag-handle-button-column');
65
65
 
66
+ const offset = direction === 'row' ? [-9, 6] : [0, -7];
67
+
66
68
  if (
67
69
  !targetHandleRef ||
68
70
  !(editorView.state.selection instanceof CellSelection)
@@ -70,8 +72,6 @@ const FloatingDragMenu = ({
70
72
  return null;
71
73
  }
72
74
 
73
- const offset = direction === 'row' ? [-9, 6] : [0, -7];
74
-
75
75
  // TODO: we will need to adjust the alignment and offset values depending on whether this is a row or column menu.
76
76
  return (
77
77
  <Popup
@@ -97,10 +97,10 @@ const FloatingDragMenu = ({
97
97
  <DragMenu
98
98
  editorView={editorView}
99
99
  isOpen={isOpen}
100
- boundariesElement={boundariesElement}
101
100
  tableNode={tableNode}
102
101
  direction={direction}
103
102
  index={index}
103
+ target={targetHandleRef || undefined}
104
104
  targetCellPosition={targetCellPosition}
105
105
  getEditorContainerWidth={getEditorContainerWidth}
106
106
  editorAnalyticsAPI={editorAnalyticsAPI}
@@ -17,9 +17,11 @@ import {
17
17
  selectColumns,
18
18
  } from '../../../commands';
19
19
  import { toggleDragMenu } from '../../../pm-plugins/drag-and-drop/commands';
20
+ import type { TriggerType } from '../../../pm-plugins/drag-and-drop/types';
20
21
  import type { CellHoverMeta, HandleTypes } from '../../../types';
21
22
  import { TableCssClassName as ClassName } from '../../../types';
22
23
  import { getRowsParams, getSelectedColumnIndexes } from '../../../utils';
24
+ import type { DragHandleAppearance } from '../../DragHandle';
23
25
  import { DragHandle } from '../../DragHandle';
24
26
 
25
27
  export interface ColumnControlsProps {
@@ -28,7 +30,6 @@ export interface ColumnControlsProps {
28
30
  isInDanger?: boolean;
29
31
  tableRef: HTMLTableElement;
30
32
  hoveredCell?: CellHoverMeta;
31
- isResizing?: boolean;
32
33
  stickyTop?: number;
33
34
  localId?: string;
34
35
  rowHeights?: number[];
@@ -57,7 +58,6 @@ export const ColumnControls = ({
57
58
  tableActive,
58
59
  tableRef,
59
60
  hoveredCell,
60
- isResizing,
61
61
  stickyTop,
62
62
  localId,
63
63
  isInDanger,
@@ -158,14 +158,13 @@ export const ColumnControls = ({
158
158
  }
159
159
  }, [editorView, tableActive]);
160
160
 
161
- const handleMouseUp = useCallback(
162
- (event) => {
161
+ const toggleDragMenuHandler = useCallback(
162
+ (trigger: TriggerType, event) => {
163
163
  const { state, dispatch } = editorView;
164
- if (event.shiftKey) {
164
+ if (event?.shiftKey) {
165
165
  return;
166
166
  }
167
-
168
- toggleDragMenu(undefined, 'column', colIndex)(state, dispatch);
167
+ toggleDragMenu(undefined, 'column', colIndex, trigger)(state, dispatch);
169
168
  },
170
169
  [editorView, colIndex],
171
170
  );
@@ -178,52 +177,15 @@ export const ColumnControls = ({
178
177
  columnControlsRef.current.scrollLeft = getScrollOffset?.() ?? 0;
179
178
  }
180
179
 
181
- const generateHandleByType = (type: HandleTypes): JSX.Element | null => {
182
- if (!hoveredCell || !colWidths?.length) {
183
- return null;
184
- }
180
+ const generateHandleByType = (
181
+ type: HandleTypes,
182
+ appearance: DragHandleAppearance,
183
+ gridColumn: string,
184
+ indexes: number[],
185
+ ) => {
185
186
  const isHover = type === 'hover';
186
-
187
- const isColumnsSelected = selectedColIndexes.length > 0;
188
187
  const previewHeight = rowHeights?.reduce((sum, cur) => sum + cur, 0) ?? 0;
189
188
 
190
- const showCondition = isHover
191
- ? isColumnsSelected &&
192
- !selectedColIndexes.includes(colIndex!) &&
193
- Number.isFinite(hoveredCell?.colIndex)
194
- : selectedColIndexes.length < colWidths?.length &&
195
- Number.isFinite(hoveredCell?.colIndex);
196
-
197
- if (!showCondition) {
198
- return null;
199
- }
200
-
201
- const gridColumnPosition = `${colIndex! + 1} / span 1`;
202
- const selectedColumnPosition = `${selectedColIndexes[0] + 1} / span ${
203
- selectedColIndexes.length
204
- }`;
205
-
206
- const hoveredAppearance = selectedColIndexes.includes(colIndex!)
207
- ? isInDanger
208
- ? 'danger'
209
- : 'selected'
210
- : 'default';
211
-
212
- const currentSelectionAppearance = isColumnsSelected
213
- ? isInDanger
214
- ? 'danger'
215
- : 'selected'
216
- : hoveredAppearance;
217
-
218
- const isSelecting = isColumnsSelected && !isHover;
219
-
220
- // this indexes are used to calculate the drag and drop source
221
- const indexes = isColumnsSelected
222
- ? isHover
223
- ? colIndexes
224
- : selectedColIndexes
225
- : colIndexes;
226
-
227
189
  const previewWidth =
228
190
  colWidths?.reduce<number>(
229
191
  (sum, v, i) =>
@@ -235,7 +197,8 @@ export const ColumnControls = ({
235
197
  <div
236
198
  key={type}
237
199
  style={{
238
- gridColumn: isSelecting ? selectedColumnPosition : gridColumnPosition,
200
+ gridColumn,
201
+ gridRow: '1',
239
202
  display: 'flex',
240
203
  justifyContent: 'center',
241
204
  alignItems: 'center',
@@ -245,9 +208,8 @@ export const ColumnControls = ({
245
208
  width: '100%',
246
209
  position: 'relative',
247
210
  }}
248
- data-column-control-index={hoveredCell.colIndex}
249
211
  data-testid={`table-floating-column-${
250
- isSelecting ? selectedColIndexes[0] : colIndex!
212
+ isHover ? colIndex : selectedColIndexes[0]
251
213
  }-drag-handle`}
252
214
  >
253
215
  <DragHandle
@@ -255,39 +217,62 @@ export const ColumnControls = ({
255
217
  direction="column"
256
218
  tableLocalId={localId || ''}
257
219
  indexes={indexes}
258
- forceDefaultHandle={isHover ? false : isColumnsSelected}
259
220
  previewWidth={previewWidth}
221
+ forceDefaultHandle={!isHover}
260
222
  previewHeight={previewHeight}
261
- appearance={
262
- isSelecting ? currentSelectionAppearance : hoveredAppearance
263
- }
223
+ appearance={appearance}
264
224
  onClick={handleClick}
265
225
  onMouseOver={handleMouseOver}
266
226
  onMouseOut={handleMouseOut}
267
- onMouseUp={handleMouseUp}
227
+ toggleDragMenu={toggleDragMenuHandler}
268
228
  editorView={editorView}
269
229
  />
270
230
  </div>
271
231
  );
272
232
  };
273
233
 
274
- const columnHandles = (hoveredCell: CellHoverMeta | undefined) => {
275
- if (!hoveredCell) {
234
+ const columnHandles = () => {
235
+ const handles = [];
236
+ const isColumnSelected = selectedColIndexes.length > 0;
237
+ const isEntireTableSelected =
238
+ (colWidths || []).length > selectedColIndexes.length;
239
+
240
+ if (!tableActive) {
276
241
  return null;
277
242
  }
278
243
 
279
- if (hoveredCell.colIndex === undefined) {
280
- return generateHandleByType('selected');
281
- }
244
+ // placeholder / selected need to always render at least one handle
245
+ // so it can be focused via keyboard shortcuts
246
+ handles.push(
247
+ generateHandleByType(
248
+ 'selected',
249
+ isColumnSelected && isEntireTableSelected
250
+ ? isInDanger
251
+ ? 'danger'
252
+ : 'selected'
253
+ : 'placeholder',
254
+ `${selectedColIndexes[0] + 1} / span ${selectedColIndexes.length}`,
255
+ selectedColIndexes,
256
+ ),
257
+ );
282
258
 
283
- const sortedHandles = [
284
- generateHandleByType('hover'),
285
- generateHandleByType('selected'),
286
- ];
259
+ if (
260
+ hoveredCell &&
261
+ isTableHovered &&
262
+ colIndex !== undefined &&
263
+ !selectedColIndexes.includes(colIndex)
264
+ ) {
265
+ handles.push(
266
+ generateHandleByType(
267
+ 'hover',
268
+ 'default',
269
+ `${colIndex! + 1} / span 1`,
270
+ colIndexes,
271
+ ),
272
+ );
273
+ }
287
274
 
288
- return hoveredCell.colIndex < selectedColIndexes[0]
289
- ? sortedHandles
290
- : sortedHandles.reverse();
275
+ return handles;
291
276
  };
292
277
 
293
278
  const containerWidth =
@@ -312,28 +297,24 @@ export const ColumnControls = ({
312
297
  pointerEvents: isDragging ? 'none' : undefined,
313
298
  }}
314
299
  >
315
- {!isResizing &&
316
- columnParams.map(({ startIndex, endIndex }, index) => (
300
+ {columnParams.map(({ startIndex, endIndex }, index) => (
301
+ <div
302
+ style={{
303
+ gridColumn: `${startIndex + 1} / span 1`,
304
+ }}
305
+ data-start-index={startIndex}
306
+ data-end-index={endIndex}
307
+ className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER}
308
+ contentEditable={false}
309
+ key={index}
310
+ >
317
311
  <div
318
- style={{
319
- gridColumn: `${startIndex + 1} / span 1`,
320
- }}
321
- data-start-index={startIndex}
322
- data-end-index={endIndex}
323
- className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER}
324
- contentEditable={false}
325
- key={index}
326
- >
327
- <div
328
- className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT}
329
- style={columnParams.length - 1 === index ? { right: '0' } : {}}
330
- />
331
- </div>
332
- ))}
333
- {tableActive &&
334
- isTableHovered &&
335
- !isResizing &&
336
- columnHandles(hoveredCell)}
312
+ className={ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT}
313
+ style={columnParams.length - 1 === index ? { right: '0' } : {}}
314
+ />
315
+ </div>
316
+ ))}
317
+ {columnHandles()}
337
318
  </div>
338
319
  </div>
339
320
  );
@@ -121,7 +121,7 @@ export const TableFloatingColumnControls: React.FC<Props> = ({
121
121
  return [0];
122
122
  }, [tableRef, tableRect.height]);
123
123
 
124
- if (!tableRef || !tableActive) {
124
+ if (!tableRef || !tableActive || isResizing) {
125
125
  return null;
126
126
  }
127
127
 
@@ -148,7 +148,6 @@ export const TableFloatingColumnControls: React.FC<Props> = ({
148
148
  editorView={editorView}
149
149
  hoveredCell={hoveredCell}
150
150
  tableRef={tableRef}
151
- isResizing={isResizing}
152
151
  tableActive={tableActive}
153
152
  isTableHovered={isTableHovered}
154
153
  stickyTop={tableActive ? stickyTop : undefined}
@@ -19,6 +19,7 @@ import type { CornerControlProps } from './types';
19
19
  const DragCornerControlsComponent = ({
20
20
  editorView,
21
21
  isInDanger,
22
+ isResizing,
22
23
  intl: { formatMessage },
23
24
  }: CornerControlProps & WrappedComponentProps) => {
24
25
  const handleOnClick = () => {
@@ -40,6 +41,10 @@ const DragCornerControlsComponent = ({
40
41
  return isTableSelected(selection);
41
42
  }, [editorView.state]);
42
43
 
44
+ if (isResizing) {
45
+ return null;
46
+ }
47
+
43
48
  return (
44
49
  <button
45
50
  className={classnames(ClassName.DRAG_CORNER_BUTTON, {