Skip to content

[Table] 可编辑的表格点击输入框、下拉框、复选框无法触发表格的选中行 #6926

Open

Description

@mi6202001

tdesign-vue-next 版本

1.19.2

重现链接

No response

重现步骤

以文档中的可编辑表格
table添加属性activeRowType="single"
column.edit添加
keepEditMode: true,
showEditIcon: false,

期望结果

点击单元格中的输入框、下拉框、复选框应该将所在行选中

实际结果

No response

框架版本

3.5.32

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Activity

  1. github-actions commented on Aug 16, 2026

    @github-actions
    Contributor

    👋 @mi6202001,感谢给 TDesign 提出了 issue。
    请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

  2. mi6202001 commented on Sep 17, 2026

    @mi6202001
    Author

    可编辑行的表格
    <t-table
    ref="tableRef"
    row-key="key"
    :columns="columns"
    :data="data"
    :editable-row-keys="editableRowKeys"
    table-layout="auto"
    bordered
    lazy-load
    activeRowType="single"
    @row-edit="onRowEdit"
    @row-validate="onRowValidate"
    @Validate="onValidate"
    />

    {
    title: '申请人',
    colKey: 'user.firstName',
    align: align.value,
    width: 120,
    // 编辑状态相关配置,全部集中在 edit
    edit: {
    // 1. 支持任意组件。需保证组件包含 value 和 onChange 两个属性,且 onChange 的第一个参数值为 new value。
    // 2. 如果希望支持校验,组件还需包含 status 和 tips 属性。具体 API 含义参考 Input 组件
    component: Input,
    // props, 透传全部属性到 Input 组件
    props: {
    clearable: true,
    autofocus: true,
    autoWidth: true,
    },
    // 校验规则,此处同 Form 表单
    rules: [
    {
    required: true,
    message: '不能为空',
    },
    {
    max: 10,
    message: '字符数量不能超过 10',
    type: 'warning',
    },
    ],
    keepEditMode: true,
    showEditIcon: false,
    },
    }

    点击编辑按钮或者取消按钮能稳定选中行,点击t-input框无法选中行。
    https://tdesign.tencent.com/vue-next/components/table?tab=demo#%E5%8F%AF%E7%BC%96%E8%BE%91%E5%8D%95%E5%85%83%E6%A0%BC%E7%9A%84%E8%A1%A8%E6%A0%BC
    [输入框、下拉框、复选框]也是一样无法选中行,只能点击单元格border才能选中

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions