Skip to content

Commit cf47aae

Browse files
committed
Fixed progress in react
1 parent a69e0ed commit cf47aae

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: sources/common/table/cell-types/progress.scss

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
position: relative;
1414
background: $progress-background-color;
1515
overflow: hidden;
16+
vertical-align: middle;
17+
margin-inline-end: 10px;
1618
}
1719

1820
.table4js__progress-cell-value {

Diff for: sources/react/table/cell-types/progress.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ export function Table4ProgressCell({ cell, className }: ITableContentCellProps)
88
const value = parseFloat(cell.data);
99
const precentage = (Number.isNaN(value) ? 0 : (value * 100).toFixed(2))+"%";
1010
return (
11-
<div className={className + " table4js__progress-cell"}>
12-
<div className="table4js__progress-cell-value" style={{ width: precentage}}>
13-
{precentage}
11+
<div className="table4js__progress-cell">
12+
<div className={className + " table4js__progress-cell-indicator"}>
13+
<div className="table4js__progress-cell-value" style={{ width: precentage}}></div>
1414
</div>
15+
<div className="table4js__progress-cell-text">{precentage}</div>
1516
</div>
1617
);
1718
}

0 commit comments

Comments
 (0)