Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h3>${model.title}</h3>
<div class="row">
<div class="col-3 detail-label"><label>Assignee:</label> <input class="form-control" value.bind="model.assignee" /></div>
<div class="col-3 detail-label"><label>Reporter:</label> <span>${model.reporter}</span></div>
<div class="col-3 detail-label"><label>Duration:</label> <span>${model.duration | decimal: 2}</span></div>
<div class="col-3 detail-label"><label>Duration:</label> <span>${model.duration}</span></div>
<div class="col-3 detail-label"><label>% Complete:</label> <span>${model.percentComplete}</span></div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './example19-detail-view.scss';

interface Item {
assignee: string;
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down
4 changes: 1 addition & 3 deletions demos/aurelia/src/examples/slickgrid/example19.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Example19DetailView: React.FC<RowDetailViewProps<Item, any>> = ({ model, a
<label>Reporter:</label> <span>{model.reporter}</span>
</div>
<div className="col-3 detail-label">
<label>Duration:</label> <span>{model.duration || 0}</span>
<label>Duration:</label> <span>{model.duration}</span>
</div>
<div className="col-3 detail-label">
<label>% Complete:</label> <span>{model.percentComplete}</span>
Expand Down
2 changes: 1 addition & 1 deletion demos/react/src/examples/slickgrid/Example19.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Example47DetailView: React.FC<RowDetailViewProps<Item, any>> = (props) =>
<label>Reporter:</label> <span>{props.model.reporter}</span>
</div>
<div className="col-3 detail-label">
<label>Duration:</label> <span>{props.model.duration || 0}</span>
<label>Duration:</label> <span>{props.model.duration}</span>
</div>
<div className="col-3 detail-label">
<label>% Complete:</label> <span>{props.model.percentComplete}</span>
Expand Down
4 changes: 1 addition & 3 deletions demos/vue/src/components/Example19.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions demos/vue/src/components/Example19Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue';

interface Item {
assignee: string;
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down Expand Up @@ -58,10 +58,10 @@ function callParentMethod(model: Item) {

<div class="row">
<div class="col-3 detail-label">
<label>Start:</label> <span>{{ model.start ? format(model.start, 'YYYY-MM-DD') : '' }}</span>
<label>Start:</label> <span>{{ model.start ? format(props.model.start, 'YYYY-MM-DD') : '' }}</span>
</div>
<div class="col-3 detail-label">
<label>Finish:</label> <span>{{ model.start ? format(model.start, 'YYYY-MM-DD') : '' }}</span>
<label>Finish:</label> <span>{{ model.finish ? format(props.model.finish, 'YYYY-MM-DD') : '' }}</span>
</div>
<div class="col-3 detail-label"><label>Effort Driven:</label> <i :class="model.effortDriven ? 'mdi mdi-check' : ''"></i></div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions demos/vue/src/components/Example47.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { VueRowDetailView } from '@slickgrid-universal/vue-row-detail-plugin';
import {
Aggregators,
Editors,
ExtensionName,
Filters,
Formatters,
GroupTotalFormatters,
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions demos/vue/src/components/Example47Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -50,7 +50,7 @@ function showNotification(model: Item) {
<label>Reporter:</label> <span>{{ model.reporter }}</span>
</div>
<div class="col-3 detail-label">
<label>Duration:</label> <span>{{ model.duration || 0 }}</span>
<label>Duration:</label> <span>{{ model.duration }}</span>
</div>
<div class="col-3 detail-label">
<label>% Complete:</label> <span>{{ model.percentComplete }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ import { Component } from '@angular/core';
})
export class RowDetailViewComponent {
model: {
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down Expand Up @@ -314,7 +314,7 @@ import { GridRowDetailComponent } from './grid-rowdetail.component';
})
export class RowDetailViewComponent {
model: {
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3>{{ model?.title }}</h3>
<label>Reporter:</label> <span>{{ model?.reporter }}</span>
</div>
<div class="col-3 detail-label">
<label>Duration:</label> <span>{{ model?.duration | number: '1.2-2' }}</span>
<label>Duration:</label> <span>{{ model?.duration }}</span>
</div>
<div class="col-3 detail-label">
<label>% Complete:</label> <span>{{ model?.percentComplete }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3>{{ model?.title }}</h3>
<label>Reporter:</label> <span>{{ model?.reporter }}</span>
</div>
<div class="col-3 detail-label">
<label>Duration:</label> <span>{{ model?.duration | number: '1.2-2' }}</span>
<label>Duration:</label> <span>{{ model?.duration }}</span>
</div>
<div class="col-3 detail-label">
<label>% Complete:</label> <span>{{ model?.percentComplete }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ import { bindable } from 'aurelia-framework';

export class DetailViewCustomElement {
@bindable() model: {
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down Expand Up @@ -300,7 +300,7 @@ import { GridRowDetailComponent } from './grid-rowdetail.component';

export class DetailViewCustomElement{
model: {
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ import './example19-detail-view.scss';

interface Props {
model: {
duration: Date;
duration: number;
percentComplete: number;
// ...
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue';

interface Item {
assignee: string;
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down Expand Up @@ -347,7 +347,7 @@ import type { RowDetailViewProps } from 'slickgrid-vue';

interface Item {
assignee: string;
duration: Date;
duration: number;
percentComplete: number;
reporter: string;
start: Date;
Expand Down
Loading