ant-design / ant-design/pro-components

Checkbox Not Rendering for Boolean ValueType in Editable Table Column

Open
#8,515 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### Checkbox Not Rendering for Boolean ValueType in Editable Table Column

When setting the `valueType` for an editable table column to **checkbox** and using a boolean value, the checkbox is not rendered. There is no checkbox element visible in the DOM.

currently I am using
```
"@ant-design/pro-table": "^3.16.1",
```

#### Steps to Reproduce
1. Configure an editable column in Ant Design Pro Table with `valueType: 'checkbox'`.
2. Assign a boolean value to this column.
3. Observe the rendered table cell for the checkbox.

#### Expected Behavior
A checkbox should appear in the cell, corresponding to the boolean value.

#### Actual Behavior
No checkbox is rendered. Additionally, inspecting the DOM reveals no checkbox-related node.

{
title: 'ID',
dataIndex: 'id',
valueType: 'checkbox',
editable: true,
render: (...params) => {
console.log(params);
// Should log details about the checkbox rendering
},
}

Console output of the render function:
![image](https://github.com/ant-design/pro-components/assets/136574224/ef9f7e3d-79d8-4e0c-8a01-f13e2a3bc8b1)

DOM inspection showing no checkbox:
![image](https://github.com/ant-design/pro-components/assets/136574224/2b82e3c4-fc96-4edd-aa9e-46cf771ddb7b)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with @ant-design/pro-table 3.16.1 using an editable table column with valueType: 'checkbox' and a boolean value, then inspect the editable table rendering path and DOM output. Done means the cell renders a checkbox corresponding to the boolean value and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.