fix: improve display of unchecked fields (#5503)

This commit is contained in:
Katherine 2024-10-24 13:08:07 +08:00 committed by GitHub
parent cdd34b027d
commit e85e131ea8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ const ReadPretty: FC<CheckboxReadPrettyProps> = (props) => {
if (props.value) {
return <CheckOutlined style={{ color: '#52c41a' }} />;
}
return props.showUnchecked ? <CloseOutlined style={{ color: '#ff4d4f' }} /> : null;
return props.showUnchecked ? <CloseOutlined style={{ color: '#ff4d4f' }} /> : <AntdCheckbox disabled />;
};
export const Checkbox: ComposedCheckbox = connect(