Skip to content

Commit fd2a06b

Browse files
committed
feat: add rowSelectionAllowUncheck to table
1 parent a2df014 commit fd2a06b

File tree

6 files changed

+57
-0
lines changed

6 files changed

+57
-0
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-vue-next/src/table/primary-table-props.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export default {
111111
type: Boolean,
112112
default: true,
113113
},
114+
/** 行选中单选场景,是否允许取消选中 */
115+
rowSelectionAllowUncheck: Boolean,
114116
/** 行选中类型,单选或多选。效果和 `columns` 中配置的 `{ colKey: 'row-select', type: 'single' }` 一样 */
115117
rowSelectionType: {
116118
type: String as PropType<TdPrimaryTableProps['rowSelectionType']>,

packages/products/tdesign-vue-next/src/table/table.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ hideSortTips | Boolean | - | hide sort tips | N
147147
indeterminateSelectedRowKeys | Array | - | indeterminate selected row keys, row key is from data[rowKey]。Typescript:`Array<string \| number>` | N
148148
multipleSort | Boolean | false | support multiple column fields sort | N
149149
reserveSelectedRowOnPaginate | Boolean | true | \- | N
150+
rowSelectionAllowUncheck | Boolean | - | allow to uncheck selection in table with single row selection | N
150151
rowSelectionType | String | - | single row selection, or multiple row selection。options: single/multiple | N
151152
selectOnRowClick | Boolean | - | select row data on row click | N
152153
selectedRowKeys | Array | [] | selected row keys, row key is from data[rowKey]`v-model:selectedRowKeys` is supported。Typescript:`Array<string \| number>` | N

packages/products/tdesign-vue-next/src/table/table.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ hideSortTips | Boolean | - | 隐藏排序文本提示,支持全局配置 `Glob
147147
indeterminateSelectedRowKeys | Array | - | 半选状态行。选中行请更为使用 `selectedRowKeys` 控制。TS 类型:`Array<string \| number>` | N
148148
multipleSort | Boolean | false | 是否支持多列排序 | N
149149
reserveSelectedRowOnPaginate | Boolean | true | 行选中功能,是否在分页时保留上一页选中结果不清空,本地数据分页场景下,会全选所有页数据。值为 `false` 则表示全部选中操作停留在当前页,不跨分页;本地数据分页场景下,全选仅选中当前页 | N
150+
rowSelectionAllowUncheck | Boolean | - | 行选中单选场景,是否允许取消选中 | N
150151
rowSelectionType | String | - | 行选中类型,单选或多选。效果和 `columns` 中配置的 `{ colKey: 'row-select', type: 'single' }` 一样。可选项:single/multiple | N
151152
selectOnRowClick | Boolean | - | 是否在点击整行时选中 | N
152153
selectedRowKeys | Array | [] | 选中行。半选状态行请更为使用 `indeterminateSelectedRowKeys` 控制。支持语法糖 `v-model:selectedRowKeys`。TS 类型:`Array<string \| number>` | N

packages/products/tdesign-vue-next/src/table/type.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,10 @@ export interface TdPrimaryTableProps<T extends TableRowData = TableRowData>
522522
* @default true
523523
*/
524524
reserveSelectedRowOnPaginate?: boolean;
525+
/**
526+
* 行选中单选场景,是否允许取消选中
527+
*/
528+
rowSelectionAllowUncheck?: boolean;
525529
/**
526530
* 行选中类型,单选或多选。效果和 `columns` 中配置的 `{ colKey: 'row-select', type: 'single' }` 一样
527531
*/

packages/scripts/api.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72082,6 +72082,55 @@
7208272082
"Boolean"
7208372083
]
7208472084
},
72085+
{
72086+
"id": 1702875824,
72087+
"platform_framework": [
72088+
"1",
72089+
"2",
72090+
"4",
72091+
"8",
72092+
"16",
72093+
"32",
72094+
"64"
72095+
],
72096+
"component": "PrimaryTable",
72097+
"field_category": 1,
72098+
"field_name": "rowSelectionAllowUncheck",
72099+
"field_type": [
72100+
"4"
72101+
],
72102+
"field_default_value": "",
72103+
"field_enum": "",
72104+
"field_desc_zh": "行选中单选场景,是否允许取消选中",
72105+
"field_desc_en": "allow to uncheck selection in table with single row selection",
72106+
"field_required": 0,
72107+
"event_input": "",
72108+
"create_time": "2023-12-18 05:03:44",
72109+
"update_time": "2023-12-18 05:03:44",
72110+
"event_output": null,
72111+
"custom_field_type": null,
72112+
"syntactic_sugar": null,
72113+
"readonly": 1,
72114+
"html_attribute": 0,
72115+
"trigger_elements": "",
72116+
"deprecated": 0,
72117+
"version": "",
72118+
"test_description": null,
72119+
"support_default_value": 0,
72120+
"field_category_text": "Props",
72121+
"platform_framework_text": [
72122+
"Vue(PC)",
72123+
"React(PC)",
72124+
"Angular(PC)",
72125+
"Vue(Mobile)",
72126+
"React(Mobile)",
72127+
"Angular(Mobile)",
72128+
"Miniprogram"
72129+
],
72130+
"field_type_text": [
72131+
"Boolean"
72132+
]
72133+
},
7208572134
{
7208672135
"id": 1702872178,
7208772136
"platform_framework": [

0 commit comments

Comments
 (0)