style: editable cell input width

This commit is contained in:
jialin
2024-09-05 12:04:49 +08:00
parent 825683dd75
commit 55ca15bdc6
@@ -40,7 +40,7 @@ const SealColumn: React.FC<SealColumnProps> = (props) => {
if (isEditing && editable) {
return valueType === 'number' ? (
<InputNumber
style={{ width: '100%' }}
style={{ minWidth: '100px', width: '100%' }}
min={0}
value={current}
onChange={(val) => {
@@ -69,9 +69,10 @@ const SealColumn: React.FC<SealColumnProps> = (props) => {
'cell-right': align === 'right'
})}
>
<span className="cell-content">{renderContent()}</span>
<span className="cell-content flex-center">
{renderContent()}
{editable && (
<>
<span>
{isEditing ? (
<>
<Tooltip
@@ -88,7 +89,7 @@ const SealColumn: React.FC<SealColumnProps> = (props) => {
</Button>
</Tooltip>
<Tooltip
title={intl.formatMessage({ id: 'common.button.undo' })}
title={intl.formatMessage({ id: 'common.button.cancel' })}
key="undo"
>
<Button
@@ -121,8 +122,9 @@ const SealColumn: React.FC<SealColumnProps> = (props) => {
</Button>
</Tooltip>
)}
</>
</span>
)}
</span>
</div>
);
};