VisActor / VisActor/VTable

[Bug] celltype为checkbox时,设置columns.disableSelect = true 无效果

Open
#3,234 2 comments 0 reactions 1 assignee View on GitHub

@Rui-Sun is already working on this.

Since Dec 30, 2024.

bug
Dominant language
TypeScript
Stars
3.7k
Forks
486
Avg merge
1d 19h
Merged PRs (30d)
16

Description

Version

1.14.3

Link to Minimal Reproduction

https://visactor.io/vtable/demo/cell-type/checkbox

Steps to Reproduce

const records = [
{ productName: 'aaaa', price: 20, check: { text: 'unchecked', checked: false, disable: false } },
{ productName: 'bbbb', price: 18, check: { text: 'checked', checked: true, disable: false } },
{ productName: 'cccc', price: 16, check: { text: 'disable', checked: true, disable: true } },
{ productName: 'cccc', price: 14, check: { text: 'disable', checked: false, disable: true } },
{ productName: 'eeee', price: 12, check: { text: 'checked', checked: false, disable: false } },
{ productName: 'ffff', price: 10, check: { text: 'checked', checked: false, disable: false } },
{ productName: 'gggg', price: 10, check: { text: 'checked', checked: false, disable: false } }
];

const columns = [
{
field: 'isCheck',
title: '',
width: 60,
headerType: 'checkbox',
cellType: 'checkbox',
disableSelect: true,
disableHeaderSelect: true,
},
{
field: 'productName',
title: 'productName',
width: 120
},
{
field: 'price',
title: 'checkbox',
width: 120,
cellType: 'checkbox',
disable: true,
checked: true
},
{
field: 'check',
title: 'checkbox',
width: 120,
cellType: 'checkbox'
// disable: true
}
];
const option = {
records,
columns
};
const tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;

Current Behavior

设置了disableSelect: true,没有任何变化

Expected Behavior

也不知道有什么变化
image

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.