Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 1.14.0版本getCheckboxState不起作用,1.13.2有作用 #3177

Open
robertyclin opened this issue Dec 23, 2024 · 0 comments
Open

[Bug] 1.14.0版本getCheckboxState不起作用,1.13.2有作用 #3177

robertyclin opened this issue Dec 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@robertyclin
Copy link

Version

1.14.0

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'
},
{
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;

tableInstance.on('click_cell', () => {
console.log('11111');
const info = tableInstance.getCheckboxState('isCheck')
console.log(info);
})

Current Behavior

返回空

Expected Behavior

返回选中的records

Environment

- OS:macOS Monterey
- Browser:Chrome 96.0.4664.55
- Framework:Vue@3

Any additional comments?

No response

@robertyclin robertyclin added the bug Something isn't working label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants