diff --git a/README.md b/README.md index a13d5078e..88e5a3ede 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ npm run test:watch - [x] Header Menu - [ ] Row Detail - [x] Row Move + - [ ] the Column itself should be created by the extension instead of the user itself + - [ ] column index position (requires SlickGrid [PR #474](https://github.com/6pac/SlickGrid/pull/474)) - [x] Row Selection - [x] Grouping Formatters (12) - [x] Sorters (5) diff --git a/packages/common/src/styles/slickgrid-theme-material.scss b/packages/common/src/styles/slickgrid-theme-material.scss index 8b5460e86..979fb93f9 100644 --- a/packages/common/src/styles/slickgrid-theme-material.scss +++ b/packages/common/src/styles/slickgrid-theme-material.scss @@ -67,6 +67,8 @@ $multiselect-icon-radio-checked: "\F043E"; $multiselect-icon-radio-unchecked: "\F0130"; $multiselect-icon-search: "\F0349"; $multiselect-unchecked-opacity: 0.8; +$row-move-plugin-cursor: grab; +$row-move-plugin-icon: "\F0278"; $slider-editor-height: 26px; $primary-color: #009530; $row-mouse-hover-color: #ebfaef; diff --git a/packages/vanilla-bundle-examples/src/app.html b/packages/vanilla-bundle-examples/src/app.html index 477dfacb6..bb9bb66a9 100644 --- a/packages/vanilla-bundle-examples/src/app.html +++ b/packages/vanilla-bundle-examples/src/app.html @@ -35,8 +35,9 @@

Slickgrid-Universal

diff --git a/packages/vanilla-bundle-examples/src/app.ts b/packages/vanilla-bundle-examples/src/app.ts index ed1f2c515..99e2944b7 100644 --- a/packages/vanilla-bundle-examples/src/app.ts +++ b/packages/vanilla-bundle-examples/src/app.ts @@ -11,6 +11,7 @@ export class App { { route: 'example02', name: 'example02', title: 'Example02', moduleId: './examples/example02' }, { route: 'example03', name: 'example03', title: 'Example03', moduleId: './examples/example03' }, { route: 'example04', name: 'example04', title: 'Example04', moduleId: './examples/example04' }, + { route: 'example05', name: 'example05', title: 'Example05', moduleId: './examples/example05' }, ] attached() { @@ -25,6 +26,9 @@ export class App { loadRoute(routeName: string, changeBrowserState = true) { if (this.renderer && routeName) { const mapRoute = this.routing.find((map) => map.route === routeName); + if (!mapRoute) { + throw new Error('No Route found, make sure that you have an associated Route in your Routing before trying to use it'); + } const viewModel = this.renderer.loadViewModel(require(`${mapRoute.moduleId}.ts`)); this.renderer.loadView(require(`${mapRoute.moduleId}.html`)); viewModel.attached(); diff --git a/packages/vanilla-bundle-examples/src/examples/example04.html b/packages/vanilla-bundle-examples/src/examples/example04.html index fc2d15eec..d825fa055 100644 --- a/packages/vanilla-bundle-examples/src/examples/example04.html +++ b/packages/vanilla-bundle-examples/src/examples/example04.html @@ -1,7 +1,18 @@

Example 04 - Tree View

- + + +
diff --git a/packages/vanilla-bundle-examples/src/examples/example04.ts b/packages/vanilla-bundle-examples/src/examples/example04.ts index 86f2cc6af..6638944b9 100644 --- a/packages/vanilla-bundle-examples/src/examples/example04.ts +++ b/packages/vanilla-bundle-examples/src/examples/example04.ts @@ -247,6 +247,18 @@ export class Example4 { // ]); } + collapseAll() { + this.dataset.forEach((item) => item._collapsed = true); + this.slickgridLwc.dataset = this.dataset; + this.gridObj.invalidate(); + } + + expandAll() { + this.dataset.forEach((item) => item._collapsed = false); + this.slickgridLwc.dataset = this.dataset; + this.gridObj.invalidate(); + } + handleOnClick(event: any) { const eventDetail = event?.detail; const args = event?.detail?.args; @@ -344,7 +356,7 @@ export class Example4 { const data = []; // prepare the data - for (let i = 0; i < 15; i++) { + for (let i = 0; i < 25; i++) { const d = (data[i] = {}); let parent;