fix: 修复 CRUD 多选模式表头初始 checkbox 展现错误 (#3747)

* fix: 修复 CRUD 多选模式表头初始 checkbox 展现错误

* 换一下实现方式
This commit is contained in:
吴多益 2022-03-11 16:54:41 +08:00 committed by GitHub
parent 60d58d23eb
commit efe4e6c885
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -502,7 +502,10 @@ export function render(
} as any;
if (options.enableAMISDebug) {
enableDebug();
// 因为里面还有 render
setTimeout(() => {
enableDebug();
}, 10);
}
store = RendererStore.create({}, options);

View File

@ -1662,7 +1662,7 @@ export default class Table extends React.Component<TableProps, object> {
{store.rows.length && multiple ? (
<Checkbox
classPrefix={ns}
partial={!store.allChecked}
partial={store.someChecked && !store.allChecked}
checked={store.someChecked}
disabled={store.disabledHeadCheckbox}
onChange={this.handleCheckAll}