Merge pull request #2618 from charltonaustin/datetimes_in_cor-tables_are_being_sorted_lexically
fix(frontend): fix data binding
This commit is contained in:
commit
d8b529bc5c
2 changed files with 6 additions and 6 deletions
|
@ -54,7 +54,7 @@ helm registry push --namespace {{ $ctrl.repository.namespace }} --channel {chann
|
|||
templateurl="/static/js/directives/ui/app-public-view/channel-name.html"></cor-table-col>
|
||||
<cor-table-col datafield="release" sortfield="release" title="Current Release"></cor-table-col>
|
||||
<cor-table-col datafield="last_modified" sortfield="last_modified" title="Last Modified"
|
||||
selected="true" dataKind="datetime"
|
||||
selected="true" kindof="datetime"
|
||||
templateurl="/static/js/directives/ui/app-public-view/last-modified.html"></cor-table-col>
|
||||
</cor-table>
|
||||
</div>
|
||||
|
@ -77,7 +77,7 @@ helm registry push --namespace {{ $ctrl.repository.namespace }} {{ $ctrl.Config.
|
|||
<cor-table-col datafield="name" sortfield="name" title="Name"></cor-table-col>
|
||||
<cor-table-col datafield="last_modified" sortfield="last_modified"
|
||||
title="Created"
|
||||
selected="true" dataKind="datetime"
|
||||
selected="true" kindof="datetime"
|
||||
templateurl="/static/js/directives/ui/app-public-view/last-modified.html"></cor-table-col>
|
||||
<cor-table-col datafield="channels" title="Channels"
|
||||
templateurl="/static/js/directives/ui/app-public-view/channels-list.html"></cor-table-col>
|
||||
|
@ -114,7 +114,7 @@ helm registry push --namespace {{ $ctrl.repository.namespace }} {{ $ctrl.Config.
|
|||
<cor-table-col datafield="name" sortfield="name" title="Name"></cor-table-col>
|
||||
<cor-table-col datafield="last_modified" sortfield="last_modified"
|
||||
title="Created"
|
||||
selected="true" dataKind="datetime"
|
||||
selected="true" kindof="datetime"
|
||||
templateurl="/static/js/directives/ui/app-public-view/last-modified.html"></cor-table-col>
|
||||
</cor-table>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@ export class CorTableColumn implements OnInit {
|
|||
@Input('@') public datafield: string;
|
||||
@Input('@') public sortfield: string;
|
||||
@Input('@') public selected: string;
|
||||
@Input('@') public dataKind: string;
|
||||
@Input('@') public kindof: string;
|
||||
|
||||
constructor(@Host() @Inject(CorTableComponent) private parent: CorTableComponent) {
|
||||
|
||||
|
@ -26,11 +26,11 @@ export class CorTableColumn implements OnInit {
|
|||
}
|
||||
|
||||
public isNumeric(): boolean {
|
||||
return this.dataKind == 'datetime';
|
||||
return this.kindof == 'datetime';
|
||||
}
|
||||
|
||||
public processColumnForOrdered(tableService: any, value: any): any {
|
||||
if (this.dataKind == 'datetime') {
|
||||
if (this.kindof == 'datetime') {
|
||||
return tableService.getReversedTimestamp(value);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue