Skip to content

Commit 82cea82

Browse files
authored
Merge pull request #3618 from alonesmall/feat-cornerHeaderSelectMode
feat: add select/cornerHeaderSelectMode config
2 parents 613a607 + 27a219c commit 82cea82

7 files changed

Lines changed: 470 additions & 15 deletions

File tree

docs/assets/option/en/common/option-secondary.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ Align excel advanced capabilities
194194

195195
Fill handle, when set to true, when a cell is selected, the fill handle will be displayed on the lower right side of the cell. You can drag the fill handle to edit the value of the cell. Or double-click the fill handle to change the value of the cell you want to edit.
196196

197-
198197
#${prefix} hover(Object)
199198

200199
Hover interaction configuration, specific configuration items as follows:
@@ -231,6 +230,20 @@ Possible values:
231230

232231
'body': Do not select the table header. Clicking a row header selects all body cells in the row. Clicking a column header selects all body cells in the column.
233232

233+
##${prefix} cornerHeaderSelectMode ('inline' | 'cell' | 'body' | 'all') = 'all'
234+
235+
When clicking on the corner header cell, the selection mode to be applied.
236+
237+
Possible values:
238+
239+
'inline': Clicking the corner header selects the entire column;
240+
241+
'cell': Select only the currently clicked corner header cell;
242+
243+
'body': Clicking the corner header selects all body cells;
244+
245+
'all': Clicking the corner header selects the entire table.
246+
234247
##${prefix} disableSelect (boolean | ((col: number, row: number, table: BaseTableAPI) => boolean)) = false
235248

236249
Do not respond to mouse select interaction.
@@ -653,4 +666,4 @@ Validate when the drag to move position ends.
653666

654667
```
655668
validateDragOrderOnEnd?: (source: CellAddress, target: CellAddress) => boolean;
656-
```
669+
```

docs/assets/option/zh/common/option-secondary.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ export interface SelectAllOnCtrlAOption {
192192

193193
填充柄,设置为 true 后,当选中单元格后,填充柄会显示在单元格右下方,可以拖动填充柄来编辑单元格的值。或者双击填充柄来改变需要编辑单元格的值。
194194

195-
196-
197195
#${prefix} hover(Object)
198196

199197
hover 交互配置,具体配置项如下:
@@ -227,6 +225,20 @@ hover 交互响应模式:十字交叉、整列、整行或者单个单元格
227225

228226
'body': 不选择表头,点击行表头则选择该行所有 body 单元格,点击列表头则选择该列所有 body 单元格。
229227

228+
##${prefix} cornerHeaderSelectMode ('inline' | 'cell' | 'body' | 'all') = 'all'
229+
230+
点击角头 corner 单元格时的选中方式。
231+
232+
可选值:
233+
234+
'inline': 点击 corner 角头整列选中;
235+
236+
'cell': 仅仅选择当前点击的 corner 角头单元格;
237+
238+
'body': 点击 corner 角头,选择所有 body 单元格;
239+
240+
'all': 点击 corner 角头,选中整个图表。
241+
230242
##${prefix} disableSelect (boolean | ((col: number, row: number, table: BaseTableAPI) => boolean)) = false
231243

232244
不响应鼠标 select 交互。
@@ -638,7 +650,7 @@ animationAppear?: boolean | {
638650

639651
##${prefix} frozenColDragHeaderMode(string) = 'fixedFrozenCount'
640652

641-
拖拽表头移动位置 针对冻结部分的规则 默认为 fixedFrozenCount。基本表格ListTable类型设置才有效
653+
拖拽表头移动位置 针对冻结部分的规则 默认为 fixedFrozenCount。基本表格 ListTable 类型设置才有效
642654

643655
- "disabled"(禁止调整冻结列位置):不允许其他列的表头移入冻结列,也不允许冻结列移出,冻结列保持不变。
644656
- "adjustFrozenCount"(根据交互结果调整冻结数量):允许其他列的表头移入冻结列,及冻结列移出,并根据拖拽的动作调整冻结列的数量。当其他列的表头被拖拽进入冻结列位置时,冻结列数量增加;当其他列的表头被拖拽移出冻结列位置时,冻结列数量减少。
@@ -651,6 +663,3 @@ animationAppear?: boolean | {
651663
```
652664
validateDragOrderOnEnd?: (source: CellAddress, target: CellAddress) => boolean;
653665
```
654-
655-
656-

packages/vtable/examples/menu.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ export const menus = [
217217
path: 'pivot',
218218
name: 'pivot-grid-tree-totals'
219219
},
220+
{
221+
path: 'pivot',
222+
name: 'pivot-grid-tree-select-cornerHeaderSelectMode'
223+
},
220224
{
221225
path: 'pivot',
222226
name: 'pivot-tree-lazy-load'

0 commit comments

Comments
 (0)