Skip to content

Commit 576db84

Browse files
committed
upgrade to gridjs v4
1 parent ff9bfb8 commit 576db84

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

libs/gridjs-angular/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In your component template
2727

2828
```ts
2929
import { Component } from '@angular/core';
30-
import { GridJsConfig } from 'gridjs-angular';
30+
import { UserConfig } from 'gridjs';
3131

3232
@Component({
3333
template: `
@@ -41,7 +41,7 @@ import { GridJsConfig } from 'gridjs-angular';
4141
`
4242
})
4343
class ExampleComponent {
44-
public gridConfig: GridJsConfig = {
44+
public gridConfig: UserConfig = {
4545
columns: ['Name', 'Email', 'Phone Number'],
4646
data: [
4747
['John', 'john@example.com', '(353) 01 222 3333'],

libs/gridjs-angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridjs-angular",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"keywords": [
55
"gridjs",
66
"table",
@@ -16,7 +16,7 @@
1616
"peerDependencies": {
1717
"@angular/common": ">=9.0.0",
1818
"@angular/core": ">=9.0.0",
19-
"gridjs": "^3.4.0"
19+
"gridjs": "^4.0.0"
2020
},
2121
"dependencies": {
2222
"tslib": "^2.0.0"

libs/gridjs-angular/src/lib/gridjs-angular.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,23 @@ import {
1212
import { Grid, UserConfig } from 'gridjs';
1313
import { GRIDJS_EVENTS, GRIDJS_PROPS } from './constants';
1414

15-
1615
@Component({
1716
selector: 'gridjs-angular',
1817
template: '',
1918
encapsulation: ViewEncapsulation.None,
2019
})
2120
export class GridJsAngularComponent
22-
implements AfterViewInit, OnChanges, OnDestroy,UserConfig {
21+
implements AfterViewInit, OnChanges, OnDestroy, UserConfig {
2322
private nativeElement: HTMLElement;
2423
private gridInstance: Grid;
2524
private initialized: boolean;
2625
private listeners: Map<string, (...args: any[]) => void> = new Map();
2726
@Input() config: UserConfig;
2827
// TODO: auto generate Inputs/Output to easily sync with grid-js main package
2928
// props
30-
@Input() plugins: UserConfig['plugins']= [];
31-
@Input() eventEmitter: UserConfig['eventEmitter'];
32-
@Input() dispatcher:UserConfig['dispatcher'];
29+
@Input() plugins: UserConfig['plugins'] = [];
30+
@Input() eventEmitter: UserConfig['eventEmitter'];
31+
@Input() dispatcher: UserConfig['dispatcher'];
3332
@Input() plugin: UserConfig['plugin'];
3433
@Input() data: UserConfig['data'];
3534
@Input() server: UserConfig['server'];
@@ -46,9 +45,10 @@ export class GridJsAngularComponent
4645
@Input() fixedHeader: UserConfig['fixedHeader'];
4746
@Input() columns: UserConfig['columns'];
4847
@Input() search: UserConfig['search'];
49-
@Input() pagination:UserConfig['pagination'];
50-
@Input() sort:UserConfig['sort'];
48+
@Input() pagination: UserConfig['pagination'];
49+
@Input() sort: UserConfig['sort'];
5150
@Input() language: UserConfig['language'];
51+
@Input() resizable: UserConfig['resizable'];
5252

5353
// events
5454
@Output() beforeLoad: EventEmitter<void> = new EventEmitter(true);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@angular/platform-browser-dynamic": "^11.2.8",
3939
"@angular/router": "^11.2.8",
4040
"@nrwl/angular": "11.6.1",
41-
"gridjs": "^3.4.0",
41+
"gridjs": "^4.0.0",
4242
"rxjs": "~6.6.7",
4343
"tslib": "^2.1.0",
4444
"zone.js": "^0.11.4"

0 commit comments

Comments
 (0)