diff --git a/demos/aurelia/src/examples/slickgrid/example19-detail-view.html b/demos/aurelia/src/examples/slickgrid/example19-detail-view.html index 4ae49a9b0..056f37f3c 100644 --- a/demos/aurelia/src/examples/slickgrid/example19-detail-view.html +++ b/demos/aurelia/src/examples/slickgrid/example19-detail-view.html @@ -3,7 +3,7 @@

${model.title}

${model.reporter}
-
${model.duration | decimal: 2}
+
${model.duration}
${model.percentComplete}
diff --git a/demos/aurelia/src/examples/slickgrid/example19-detail-view.ts b/demos/aurelia/src/examples/slickgrid/example19-detail-view.ts index 0a40aa95c..21c19aef2 100644 --- a/demos/aurelia/src/examples/slickgrid/example19-detail-view.ts +++ b/demos/aurelia/src/examples/slickgrid/example19-detail-view.ts @@ -5,7 +5,7 @@ import './example19-detail-view.scss'; interface Item { assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; diff --git a/demos/aurelia/src/examples/slickgrid/example19.ts b/demos/aurelia/src/examples/slickgrid/example19.ts index 7d9f58700..0f2d5deb9 100644 --- a/demos/aurelia/src/examples/slickgrid/example19.ts +++ b/demos/aurelia/src/examples/slickgrid/example19.ts @@ -62,8 +62,6 @@ export class Example19 { id: 'duration', name: 'Duration (days)', field: 'duration', - formatter: Formatters.decimal, - params: { minDecimal: 1, maxDecimal: 2 }, sortable: true, type: 'number', minWidth: 90, @@ -192,7 +190,7 @@ export class Example19 { dataset[i] = { rowId: i, title: 'Task ' + i, - duration: Math.ceil(Math.random() * 100), + duration: i % 33 === 0 ? null : Math.floor(Math.random() * 100) + 1, percentComplete: randomPercent, percentComplete2: randomPercent, percentCompleteNumber: randomPercent, diff --git a/demos/aurelia/src/examples/slickgrid/example47-detail-view.ts b/demos/aurelia/src/examples/slickgrid/example47-detail-view.ts index 615f9e0c7..befa475e0 100644 --- a/demos/aurelia/src/examples/slickgrid/example47-detail-view.ts +++ b/demos/aurelia/src/examples/slickgrid/example47-detail-view.ts @@ -7,7 +7,7 @@ import './example47-detail-view.scss'; interface Item { id: number; assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; diff --git a/demos/react/src/examples/slickgrid/Example19-detail-view.tsx b/demos/react/src/examples/slickgrid/Example19-detail-view.tsx index 5084556ca..3a457b845 100644 --- a/demos/react/src/examples/slickgrid/Example19-detail-view.tsx +++ b/demos/react/src/examples/slickgrid/Example19-detail-view.tsx @@ -63,7 +63,7 @@ const Example19DetailView: React.FC> = ({ model, a {model.reporter}
- {model.duration || 0} + {model.duration}
{model.percentComplete} diff --git a/demos/react/src/examples/slickgrid/Example19.tsx b/demos/react/src/examples/slickgrid/Example19.tsx index bd9ea215a..902e84764 100644 --- a/demos/react/src/examples/slickgrid/Example19.tsx +++ b/demos/react/src/examples/slickgrid/Example19.tsx @@ -200,7 +200,7 @@ const Example19: React.FC = () => { tmpData[i] = { rowId: i, title: 'Task ' + i, - duration: i % 33 === 0 ? null : Math.random() * 100 + '', + duration: i % 33 === 0 ? null : Math.floor(Math.random() * 100) + 1, percentComplete: randomPercent, percentComplete2: randomPercent, percentCompleteNumber: randomPercent, diff --git a/demos/react/src/examples/slickgrid/Example47-detail-view.tsx b/demos/react/src/examples/slickgrid/Example47-detail-view.tsx index d1bdd513b..491ca8382 100644 --- a/demos/react/src/examples/slickgrid/Example47-detail-view.tsx +++ b/demos/react/src/examples/slickgrid/Example47-detail-view.tsx @@ -66,7 +66,7 @@ const Example47DetailView: React.FC> = (props) => {props.model.reporter}
- {props.model.duration || 0} + {props.model.duration}
{props.model.percentComplete} diff --git a/demos/vue/src/components/Example19.vue b/demos/vue/src/components/Example19.vue index 11e6c12db..b9239270c 100644 --- a/demos/vue/src/components/Example19.vue +++ b/demos/vue/src/components/Example19.vue @@ -48,8 +48,6 @@ function defineGrid() { id: 'duration', name: 'Duration (days)', field: 'duration', - formatter: Formatters.decimal, - params: { minDecimal: 1, maxDecimal: 2 }, sortable: true, type: 'number', minWidth: 90, @@ -196,7 +194,7 @@ function getData(count: number) { tmpData[i] = { rowId: i, title: 'Task ' + i, - duration: i % 33 === 0 ? null : Math.random() * 100 + '', + duration: i % 33 === 0 ? null : Math.floor(Math.random() * 100) + 1, percentComplete: randomPercent, percentComplete2: randomPercent, percentCompleteNumber: randomPercent, diff --git a/demos/vue/src/components/Example19Detail.vue b/demos/vue/src/components/Example19Detail.vue index 4d942e1cf..f064a1485 100644 --- a/demos/vue/src/components/Example19Detail.vue +++ b/demos/vue/src/components/Example19Detail.vue @@ -4,7 +4,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue'; interface Item { assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; @@ -58,10 +58,10 @@ function callParentMethod(model: Item) {
- {{ model.start ? format(model.start, 'YYYY-MM-DD') : '' }} + {{ model.start ? format(props.model.start, 'YYYY-MM-DD') : '' }}
- {{ model.start ? format(model.start, 'YYYY-MM-DD') : '' }} + {{ model.finish ? format(props.model.finish, 'YYYY-MM-DD') : '' }}
diff --git a/demos/vue/src/components/Example47.vue b/demos/vue/src/components/Example47.vue index 689f8b1f9..095894a63 100644 --- a/demos/vue/src/components/Example47.vue +++ b/demos/vue/src/components/Example47.vue @@ -3,7 +3,6 @@ import { VueRowDetailView } from '@slickgrid-universal/vue-row-detail-plugin'; import { Aggregators, Editors, - ExtensionName, Filters, Formatters, GroupTotalFormatters, @@ -41,7 +40,7 @@ const showSubTitle = ref(true); const serverWaitDelay = ref(FAKE_SERVER_DELAY); // server simulation with default of 250ms but 50ms for Cypress tests let vueGrid!: SlickgridVueInstance; -const rowDetailInstance = computed(() => vueGrid?.extensionService.getExtensionInstanceByName(ExtensionName.rowDetailView)); +const rowDetailInstance = computed(() => vueGrid?.extensionService.getExtensionInstanceByName('rowDetailView')); onBeforeMount(() => { defineGrid(); diff --git a/demos/vue/src/components/Example47Detail.vue b/demos/vue/src/components/Example47Detail.vue index 5244bc4a1..782fa63d4 100644 --- a/demos/vue/src/components/Example47Detail.vue +++ b/demos/vue/src/components/Example47Detail.vue @@ -6,7 +6,7 @@ import { showToast } from './utilities.js'; interface Item { id: number; assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; @@ -50,7 +50,7 @@ function showNotification(model: Item) { {{ model.reporter }}
- {{ model.duration || 0 }} + {{ model.duration }}
{{ model.percentComplete }} diff --git a/frameworks/angular-slickgrid/docs/grid-functionalities/row-detail.md b/frameworks/angular-slickgrid/docs/grid-functionalities/row-detail.md index 2c914fb4b..c6c1f60a9 100644 --- a/frameworks/angular-slickgrid/docs/grid-functionalities/row-detail.md +++ b/frameworks/angular-slickgrid/docs/grid-functionalities/row-detail.md @@ -226,7 +226,7 @@ import { Component } from '@angular/core'; }) export class RowDetailViewComponent { model: { - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; @@ -314,7 +314,7 @@ import { GridRowDetailComponent } from './grid-rowdetail.component'; }) export class RowDetailViewComponent { model: { - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; diff --git a/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.html b/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.html index cc3323e8f..6fb010664 100644 --- a/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.html +++ b/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.html @@ -6,7 +6,7 @@

{{ model?.title }}

{{ model?.reporter }}
- {{ model?.duration | number: '1.2-2' }} + {{ model?.duration }}
{{ model?.percentComplete }} diff --git a/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.ts b/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.ts index 4221a0576..27292d66d 100644 --- a/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.ts +++ b/frameworks/angular-slickgrid/src/demos/examples/example19-rowdetail.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, DecimalPipe } from '@angular/common'; +import { DatePipe } from '@angular/common'; import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; import type { SlickDataView, SlickGrid } from '../../library'; @@ -19,7 +19,7 @@ interface ItemDetail { @Component({ styles: ['.detail-label { display: inline-flex; align-items: center; gap: 4px; padding: 4px; }', 'label { font-weight: 600; }'], templateUrl: './example19-rowdetail.component.html', - imports: [DatePipe, DecimalPipe, FormsModule], + imports: [DatePipe, FormsModule], }) export class Example19RowDetailComponent { model: ItemDetail = {} as ItemDetail; diff --git a/frameworks/angular-slickgrid/src/demos/examples/example19.component.ts b/frameworks/angular-slickgrid/src/demos/examples/example19.component.ts index da68940ef..1daa5fd4a 100644 --- a/frameworks/angular-slickgrid/src/demos/examples/example19.component.ts +++ b/frameworks/angular-slickgrid/src/demos/examples/example19.component.ts @@ -71,8 +71,6 @@ export class Example19Component implements OnDestroy, OnInit { id: 'duration', name: 'Duration (days)', field: 'duration', - formatter: Formatters.decimal, - params: { minDecimal: 1, maxDecimal: 2 }, sortable: true, type: 'number', minWidth: 90, @@ -221,7 +219,7 @@ export class Example19Component implements OnDestroy, OnInit { tmpData[i] = { rowId: i, title: 'Task ' + i, - duration: i % 33 === 0 ? null : Math.random() * 100 + '', + duration: i % 33 === 0 ? null : Math.floor(Math.random() * 100) + 1, percentComplete: randomPercent, percentComplete2: randomPercent, percentCompleteNumber: randomPercent, diff --git a/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.html b/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.html index b721fc494..64361d346 100644 --- a/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.html +++ b/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.html @@ -6,7 +6,7 @@

{{ model?.title }}

{{ model?.reporter }}
- {{ model?.duration | number: '1.2-2' }} + {{ model?.duration }}
{{ model?.percentComplete }} diff --git a/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.ts b/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.ts index d537220d4..e24997322 100644 --- a/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.ts +++ b/frameworks/angular-slickgrid/src/demos/examples/example47-rowdetail.component.ts @@ -1,4 +1,4 @@ -import { DatePipe, DecimalPipe } from '@angular/common'; +import { DatePipe } from '@angular/common'; import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; import type { SlickDataView, SlickGrid } from '../../library'; @@ -20,7 +20,7 @@ interface ItemDetail { @Component({ styles: ['.detail-label { display: inline-flex; align-items: center; gap: 4px; padding: 4px; }', 'label { font-weight: 600; }'], templateUrl: './example47-rowdetail.component.html', - imports: [FormsModule, DecimalPipe, DatePipe], + imports: [FormsModule, DatePipe], }) export class Example47RowDetailComponent { model!: ItemDetail; diff --git a/frameworks/aurelia-slickgrid/docs/grid-functionalities/row-detail.md b/frameworks/aurelia-slickgrid/docs/grid-functionalities/row-detail.md index 672d1a14b..367d70506 100644 --- a/frameworks/aurelia-slickgrid/docs/grid-functionalities/row-detail.md +++ b/frameworks/aurelia-slickgrid/docs/grid-functionalities/row-detail.md @@ -221,7 +221,7 @@ import { bindable } from 'aurelia-framework'; export class DetailViewCustomElement { @bindable() model: { - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; @@ -300,7 +300,7 @@ import { GridRowDetailComponent } from './grid-rowdetail.component'; export class DetailViewCustomElement{ model: { - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; diff --git a/frameworks/slickgrid-react/docs/grid-functionalities/row-detail.md b/frameworks/slickgrid-react/docs/grid-functionalities/row-detail.md index ce23fe0ac..c2592ce63 100644 --- a/frameworks/slickgrid-react/docs/grid-functionalities/row-detail.md +++ b/frameworks/slickgrid-react/docs/grid-functionalities/row-detail.md @@ -187,7 +187,7 @@ import './example19-detail-view.scss'; interface Props { model: { - duration: Date; + duration: number; percentComplete: number; // ... }; diff --git a/frameworks/slickgrid-vue/docs/grid-functionalities/row-detail.md b/frameworks/slickgrid-vue/docs/grid-functionalities/row-detail.md index 98fb6ae93..aa5a46975 100644 --- a/frameworks/slickgrid-vue/docs/grid-functionalities/row-detail.md +++ b/frameworks/slickgrid-vue/docs/grid-functionalities/row-detail.md @@ -169,7 +169,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue'; interface Item { assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date; @@ -347,7 +347,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue'; interface Item { assignee: string; - duration: Date; + duration: number; percentComplete: number; reporter: string; start: Date;