Skip to content

Commit 82d931e

Browse files
committed
chore: improve Row Detail demos
1 parent 136a672 commit 82d931e

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

with-i18n-translate/src/examples/slickgrid/Example19-detail-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const Example19DetailView: React.FC<RowDetailViewProps<Item, any>> = ({ model, a
6363
<label>Reporter:</label> <span>{model.reporter}</span>
6464
</div>
6565
<div className="col-3 detail-label">
66-
<label>Duration:</label> <span>{model.duration || 0}</span>
66+
<label>Duration:</label> <span>{model.duration}</span>
6767
</div>
6868
<div className="col-3 detail-label">
6969
<label>% Complete:</label> <span>{model.percentComplete}</span>

with-i18n-translate/src/examples/slickgrid/Example19.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ const Example19: React.FC = () => {
5050
id: 'duration',
5151
name: 'Duration (days)',
5252
field: 'duration',
53-
formatter: Formatters.decimal,
54-
params: { minDecimal: 1, maxDecimal: 2 },
5553
sortable: true,
5654
type: 'number',
5755
minWidth: 90,
@@ -200,7 +198,7 @@ const Example19: React.FC = () => {
200198
tmpData[i] = {
201199
rowId: i,
202200
title: 'Task ' + i,
203-
duration: i % 33 === 0 ? null : Math.random() * 100 + '',
201+
duration: i % 33 === 0 ? null : Math.floor(Math.random() * 100) + 1,
204202
percentComplete: randomPercent,
205203
percentComplete2: randomPercent,
206204
percentCompleteNumber: randomPercent,

with-i18n-translate/src/examples/slickgrid/Example47-detail-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const Example47DetailView: React.FC<RowDetailViewProps<Item, any>> = (props) =>
6666
<label>Reporter:</label> <span>{props.model.reporter}</span>
6767
</div>
6868
<div className="col-3 detail-label">
69-
<label>Duration:</label> <span>{props.model.duration || 0}</span>
69+
<label>Duration:</label> <span>{props.model.duration}</span>
7070
</div>
7171
<div className="col-3 detail-label">
7272
<label>% Complete:</label> <span>{props.model.percentComplete}</span>

0 commit comments

Comments
 (0)