angular-slickgrid 9.0.0 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs +16 -16
- package/package.json +27 -14
- package/.gitbook.yaml +0 -5
- package/CHANGELOG.md +0 -1691
- package/CONTRIBUTING.md +0 -17
- package/angular.json +0 -133
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -1620
- package/coverage/coverage-final.json +0 -9
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -176
- package/coverage/library/components/angular-slickgrid.component.ts.html +0 -5074
- package/coverage/library/components/index.html +0 -116
- package/coverage/library/constants.ts.html +0 -397
- package/coverage/library/extensions/index.html +0 -116
- package/coverage/library/extensions/slickRowDetailView.ts.html +0 -1261
- package/coverage/library/index.html +0 -116
- package/coverage/library/modules/angular-slickgrid.module.ts.html +0 -166
- package/coverage/library/modules/index.html +0 -116
- package/coverage/library/services/angularUtil.service.ts.html +0 -445
- package/coverage/library/services/container.service.ts.html +0 -163
- package/coverage/library/services/index.html +0 -161
- package/coverage/library/services/translater.service.ts.html +0 -199
- package/coverage/library/services/utilities.ts.html +0 -142
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/dist/LICENSE +0 -21
- package/dist/README.md +0 -142
- package/docs/README.md +0 -5
- package/docs/TOC.md +0 -105
- package/docs/backend-services/Custom-Backend-Service.md +0 -50
- package/docs/backend-services/GraphQL.md +0 -276
- package/docs/backend-services/OData.md +0 -245
- package/docs/backend-services/graphql/GraphQL-Filtering.md +0 -156
- package/docs/backend-services/graphql/GraphQL-JSON-Result.md +0 -85
- package/docs/backend-services/graphql/GraphQL-Pagination.md +0 -77
- package/docs/backend-services/graphql/GraphQL-Sorting.md +0 -78
- package/docs/column-functionalities/cell-menu.md +0 -212
- package/docs/column-functionalities/editors/autocomplete-editor.md +0 -466
- package/docs/column-functionalities/editors/date-editor-flatpickr.md +0 -71
- package/docs/column-functionalities/editors/date-editor-vanilla-calendar.md +0 -91
- package/docs/column-functionalities/editors/longtext-editor-textarea.md +0 -80
- package/docs/column-functionalities/editors/select-dropdown-editor.md +0 -227
- package/docs/column-functionalities/editors.md +0 -604
- package/docs/column-functionalities/filters/autocomplete-filter.md +0 -183
- package/docs/column-functionalities/filters/compound-filters.md +0 -234
- package/docs/column-functionalities/filters/custom-filter.md +0 -117
- package/docs/column-functionalities/filters/filter-intro.md +0 -81
- package/docs/column-functionalities/filters/input-filter.md +0 -260
- package/docs/column-functionalities/filters/range-filters.md +0 -188
- package/docs/column-functionalities/filters/select-filter.md +0 -695
- package/docs/column-functionalities/filters/single-search-filter.md +0 -77
- package/docs/column-functionalities/filters/styling-filled-filters.md +0 -45
- package/docs/column-functionalities/formatters.md +0 -325
- package/docs/column-functionalities/sorting.md +0 -200
- package/docs/developer-guides/csp-compliance.md +0 -64
- package/docs/events/Available-Events.md +0 -223
- package/docs/events/Grid-&-DataView-Events.md +0 -211
- package/docs/getting-started/quick-start.md +0 -230
- package/docs/getting-started/troubleshooting.md +0 -80
- package/docs/grid-functionalities/Column-Picker.md +0 -22
- package/docs/grid-functionalities/Composite-Editor-Modal.md +0 -627
- package/docs/grid-functionalities/Context-Menu.md +0 -226
- package/docs/grid-functionalities/Custom-Footer.md +0 -80
- package/docs/grid-functionalities/Custom-Tooltip-(plugin).md +0 -258
- package/docs/grid-functionalities/Export-to-Excel.md +0 -457
- package/docs/grid-functionalities/Export-to-Text-File.md +0 -165
- package/docs/grid-functionalities/FAQ.md +0 -53
- package/docs/grid-functionalities/Global-Options.md +0 -29
- package/docs/grid-functionalities/Grid-Auto-Resize.md +0 -218
- package/docs/grid-functionalities/Grid-Menu.md +0 -134
- package/docs/grid-functionalities/Grid-State-&-Preset.md +0 -245
- package/docs/grid-functionalities/Header-Menu-&-Header-Buttons.md +0 -125
- package/docs/grid-functionalities/Resize-by-Cell-Content.md +0 -138
- package/docs/grid-functionalities/Row-Selection.md +0 -247
- package/docs/grid-functionalities/Row-based-edit.md +0 -71
- package/docs/grid-functionalities/add-update-highlight.md +0 -258
- package/docs/grid-functionalities/column-row-spanning.md +0 -74
- package/docs/grid-functionalities/dynamic-item-metadata.md +0 -124
- package/docs/grid-functionalities/excel-copy-buffer.md +0 -145
- package/docs/grid-functionalities/frozen-columns-rows.md +0 -164
- package/docs/grid-functionalities/grouping-and-aggregators.md +0 -269
- package/docs/grid-functionalities/header-footer-slots.md +0 -22
- package/docs/grid-functionalities/infinite-scroll.md +0 -150
- package/docs/grid-functionalities/providing-grid-data.md +0 -61
- package/docs/grid-functionalities/row-detail.md +0 -530
- package/docs/grid-functionalities/tree-data-grid.md +0 -391
- package/docs/localization/Localization---Component-Sample.md +0 -87
- package/docs/localization/Localization-with-Custom-Locales.md +0 -66
- package/docs/localization/Localization-with-ngx-translate.md +0 -148
- package/docs/migrations/migration-to-2.x.md +0 -304
- package/docs/migrations/migration-to-3.x.md +0 -295
- package/docs/migrations/migration-to-4.x.md +0 -83
- package/docs/migrations/migration-to-5.x.md +0 -160
- package/docs/migrations/migration-to-6.x.md +0 -128
- package/docs/migrations/migration-to-7.x.md +0 -294
- package/docs/migrations/migration-to-8.x.md +0 -316
- package/docs/migrations/migration-to-9.x.md +0 -219
- package/docs/slick-grid-dataview-objects/slickgrid-dataview-objects.md +0 -79
- package/docs/styling/dark-mode.md +0 -100
- package/docs/styling/styling.md +0 -250
- package/docs/testing/testing-patterns.md +0 -73
- package/eslint.config.mjs +0 -60
- package/ng-package.json +0 -10
- package/src/assets/angular-logo.png +0 -0
- package/src/assets/angular-logo2.png +0 -0
- package/src/assets/data/collection_100_numbers.json +0 -12
- package/src/assets/data/collection_500_numbers.json +0 -52
- package/src/assets/data/countries.json +0 -245
- package/src/assets/data/country_names.json +0 -245
- package/src/assets/data/customers_100.json +0 -102
- package/src/assets/data/users.csv +0 -5
- package/src/assets/i18n/en.json +0 -102
- package/src/assets/i18n/fr.json +0 -103
- package/src/demos/app-routing.module.ts +0 -108
- package/src/demos/app.component.html +0 -187
- package/src/demos/app.component.scss +0 -79
- package/src/demos/app.component.ts +0 -11
- package/src/demos/app.module.ts +0 -196
- package/src/demos/environments/environment.dev.ts +0 -3
- package/src/demos/environments/environment.prod.ts +0 -3
- package/src/demos/environments/environment.ts +0 -8
- package/src/demos/examples/custom-angularComponentEditor.ts +0 -187
- package/src/demos/examples/custom-angularComponentFilter.ts +0 -123
- package/src/demos/examples/custom-buttonFormatter.component.ts +0 -13
- package/src/demos/examples/custom-inputEditor.ts +0 -132
- package/src/demos/examples/custom-inputFilter.ts +0 -134
- package/src/demos/examples/custom-titleFormatter.component.ts +0 -9
- package/src/demos/examples/data/collection_100_numbers.json +0 -12
- package/src/demos/examples/data/collection_500_numbers.json +0 -52
- package/src/demos/examples/data/countries.json +0 -245
- package/src/demos/examples/data/country_names.json +0 -245
- package/src/demos/examples/data/customers_100.json +0 -102
- package/src/demos/examples/data/users.csv +0 -5
- package/src/demos/examples/editor-ng-select.component.ts +0 -38
- package/src/demos/examples/example01.component.html +0 -48
- package/src/demos/examples/example01.component.ts +0 -109
- package/src/demos/examples/example02.component.html +0 -45
- package/src/demos/examples/example02.component.ts +0 -218
- package/src/demos/examples/example03.component.html +0 -118
- package/src/demos/examples/example03.component.ts +0 -694
- package/src/demos/examples/example04.component.html +0 -87
- package/src/demos/examples/example04.component.ts +0 -326
- package/src/demos/examples/example05.component.html +0 -151
- package/src/demos/examples/example05.component.ts +0 -474
- package/src/demos/examples/example06.component.html +0 -163
- package/src/demos/examples/example06.component.ts +0 -446
- package/src/demos/examples/example07.component.html +0 -56
- package/src/demos/examples/example07.component.scss +0 -10
- package/src/demos/examples/example07.component.ts +0 -216
- package/src/demos/examples/example08.component.html +0 -51
- package/src/demos/examples/example08.component.scss +0 -23
- package/src/demos/examples/example08.component.ts +0 -195
- package/src/demos/examples/example09.component.html +0 -55
- package/src/demos/examples/example09.component.scss +0 -22
- package/src/demos/examples/example09.component.ts +0 -302
- package/src/demos/examples/example10.component.html +0 -103
- package/src/demos/examples/example10.component.ts +0 -309
- package/src/demos/examples/example11.component.html +0 -91
- package/src/demos/examples/example11.component.ts +0 -276
- package/src/demos/examples/example12.component.html +0 -98
- package/src/demos/examples/example12.component.ts +0 -317
- package/src/demos/examples/example13.component.html +0 -96
- package/src/demos/examples/example13.component.ts +0 -370
- package/src/demos/examples/example14.component.html +0 -50
- package/src/demos/examples/example14.component.scss +0 -11
- package/src/demos/examples/example14.component.ts +0 -156
- package/src/demos/examples/example15.component.html +0 -56
- package/src/demos/examples/example15.component.ts +0 -304
- package/src/demos/examples/example16.component.html +0 -77
- package/src/demos/examples/example16.component.ts +0 -277
- package/src/demos/examples/example17.component.html +0 -50
- package/src/demos/examples/example17.component.ts +0 -109
- package/src/demos/examples/example18.component.html +0 -132
- package/src/demos/examples/example18.component.ts +0 -445
- package/src/demos/examples/example19-rowdetail.component.html +0 -40
- package/src/demos/examples/example19-rowdetail.component.ts +0 -54
- package/src/demos/examples/example19.component.html +0 -79
- package/src/demos/examples/example19.component.ts +0 -316
- package/src/demos/examples/example20.component.html +0 -76
- package/src/demos/examples/example20.component.scss +0 -11
- package/src/demos/examples/example20.component.ts +0 -341
- package/src/demos/examples/example21.component.html +0 -86
- package/src/demos/examples/example21.component.scss +0 -16
- package/src/demos/examples/example21.component.ts +0 -140
- package/src/demos/examples/example22.component.html +0 -41
- package/src/demos/examples/example22.component.ts +0 -117
- package/src/demos/examples/example23.component.html +0 -111
- package/src/demos/examples/example23.component.ts +0 -323
- package/src/demos/examples/example24.component.html +0 -120
- package/src/demos/examples/example24.component.scss +0 -62
- package/src/demos/examples/example24.component.ts +0 -641
- package/src/demos/examples/example25.component.html +0 -60
- package/src/demos/examples/example25.component.scss +0 -8
- package/src/demos/examples/example25.component.ts +0 -255
- package/src/demos/examples/example26.component.html +0 -98
- package/src/demos/examples/example26.component.scss +0 -42
- package/src/demos/examples/example26.component.ts +0 -383
- package/src/demos/examples/example27.component.html +0 -138
- package/src/demos/examples/example27.component.scss +0 -10
- package/src/demos/examples/example27.component.ts +0 -369
- package/src/demos/examples/example28.component.html +0 -143
- package/src/demos/examples/example28.component.scss +0 -54
- package/src/demos/examples/example28.component.ts +0 -453
- package/src/demos/examples/example29.component.html +0 -30
- package/src/demos/examples/example29.component.ts +0 -70
- package/src/demos/examples/example30.component.html +0 -116
- package/src/demos/examples/example30.component.scss +0 -20
- package/src/demos/examples/example30.component.ts +0 -1070
- package/src/demos/examples/example32.component.html +0 -77
- package/src/demos/examples/example32.component.scss +0 -8
- package/src/demos/examples/example32.component.ts +0 -905
- package/src/demos/examples/example33.component.html +0 -50
- package/src/demos/examples/example33.component.scss +0 -46
- package/src/demos/examples/example33.component.ts +0 -571
- package/src/demos/examples/example34.component.html +0 -82
- package/src/demos/examples/example34.component.scss +0 -77
- package/src/demos/examples/example34.component.ts +0 -434
- package/src/demos/examples/example35.component.html +0 -77
- package/src/demos/examples/example35.component.scss +0 -18
- package/src/demos/examples/example35.component.ts +0 -264
- package/src/demos/examples/example36.component.html +0 -56
- package/src/demos/examples/example36.component.scss +0 -26
- package/src/demos/examples/example36.component.ts +0 -504
- package/src/demos/examples/example37.component.html +0 -30
- package/src/demos/examples/example37.component.ts +0 -123
- package/src/demos/examples/example38.component.html +0 -104
- package/src/demos/examples/example38.component.scss +0 -8
- package/src/demos/examples/example38.component.ts +0 -420
- package/src/demos/examples/example39.component.html +0 -112
- package/src/demos/examples/example39.component.scss +0 -8
- package/src/demos/examples/example39.component.ts +0 -371
- package/src/demos/examples/example40.component.html +0 -76
- package/src/demos/examples/example40.component.ts +0 -226
- package/src/demos/examples/example41.component.html +0 -50
- package/src/demos/examples/example41.component.scss +0 -42
- package/src/demos/examples/example41.component.ts +0 -229
- package/src/demos/examples/example42.component.html +0 -47
- package/src/demos/examples/example42.component.ts +0 -203
- package/src/demos/examples/example43.component.html +0 -94
- package/src/demos/examples/example43.component.scss +0 -30
- package/src/demos/examples/example43.component.ts +0 -449
- package/src/demos/examples/example44.component.html +0 -78
- package/src/demos/examples/example44.component.scss +0 -50
- package/src/demos/examples/example44.component.ts +0 -375
- package/src/demos/examples/example45-detail.component.html +0 -15
- package/src/demos/examples/example45-detail.component.ts +0 -97
- package/src/demos/examples/example45.component.html +0 -110
- package/src/demos/examples/example45.component.scss +0 -50
- package/src/demos/examples/example45.component.ts +0 -243
- package/src/demos/examples/filter-ng-select.component.ts +0 -33
- package/src/demos/examples/grid-custom-pager.component.html +0 -60
- package/src/demos/examples/grid-custom-pager.component.scss +0 -57
- package/src/demos/examples/grid-custom-pager.component.ts +0 -107
- package/src/demos/examples/grid-remote.component.html +0 -44
- package/src/demos/examples/grid-remote.component.ts +0 -164
- package/src/demos/examples/home.component.html +0 -39
- package/src/demos/examples/home.component.ts +0 -10
- package/src/demos/examples/jsonp.ts +0 -89
- package/src/demos/examples/rowdetail-preload.component.ts +0 -10
- package/src/demos/examples/swt-common-grid-pagination.component.ts +0 -160
- package/src/demos/examples/swt-common-grid-test.component.html +0 -37
- package/src/demos/examples/swt-common-grid-test.component.ts +0 -214
- package/src/demos/examples/swt-common-grid.component.ts +0 -436
- package/src/demos/examples/swt-logger.service.ts +0 -173
- package/src/demos/examples/utilities.ts +0 -9
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -17
- package/src/library/components/__tests__/angular-slickgrid.component.spec.ts +0 -2638
- package/src/library/components/angular-slickgrid.component.html +0 -5
- package/src/library/components/angular-slickgrid.component.ts +0 -1662
- package/src/library/constants.ts +0 -105
- package/src/library/extensions/__tests__/slickRowDetailView.spec.ts +0 -751
- package/src/library/extensions/index.ts +0 -1
- package/src/library/extensions/slickRowDetailView.ts +0 -395
- package/src/library/global-grid-options.ts +0 -273
- package/src/library/index.ts +0 -11
- package/src/library/models/angularComponentOutput.interface.ts +0 -6
- package/src/library/models/angularGridInstance.interface.ts +0 -76
- package/src/library/models/externalTestingDependencies.interface.ts +0 -37
- package/src/library/models/gridOption.interface.ts +0 -15
- package/src/library/models/index.ts +0 -5
- package/src/library/models/rowDetailView.interface.ts +0 -16
- package/src/library/modules/angular-slickgrid.module.spec.ts +0 -25
- package/src/library/modules/angular-slickgrid.module.ts +0 -27
- package/src/library/services/__tests__/angularUtilService.spec.ts +0 -156
- package/src/library/services/__tests__/container.service.spec.ts +0 -25
- package/src/library/services/__tests__/translater.service.spec.ts +0 -43
- package/src/library/services/__tests__/utilities.spec.ts +0 -22
- package/src/library/services/angularUtil.service.ts +0 -120
- package/src/library/services/container.service.ts +0 -26
- package/src/library/services/index.ts +0 -4
- package/src/library/services/translater.service.ts +0 -38
- package/src/library/services/utilities.ts +0 -19
- package/src/library/slickgrid-config.ts +0 -10
- package/src/main.ts +0 -13
- package/src/public_api.ts +0 -1
- package/src/styles.scss +0 -178
- package/test/cypress/e2e/example01.cy.ts +0 -367
- package/test/cypress/e2e/example02.cy.ts +0 -60
- package/test/cypress/e2e/example03.cy.ts +0 -268
- package/test/cypress/e2e/example04.cy.ts +0 -254
- package/test/cypress/e2e/example05.cy.ts +0 -804
- package/test/cypress/e2e/example06.cy.ts +0 -890
- package/test/cypress/e2e/example07.cy.ts +0 -384
- package/test/cypress/e2e/example08.cy.ts +0 -190
- package/test/cypress/e2e/example09.cy.ts +0 -392
- package/test/cypress/e2e/example10.cy.ts +0 -650
- package/test/cypress/e2e/example11.cy.ts +0 -86
- package/test/cypress/e2e/example12.cy.ts +0 -269
- package/test/cypress/e2e/example13.cy.ts +0 -246
- package/test/cypress/e2e/example14.cy.ts +0 -122
- package/test/cypress/e2e/example15.cy.ts +0 -598
- package/test/cypress/e2e/example16.cy.ts +0 -427
- package/test/cypress/e2e/example17.cy.ts +0 -83
- package/test/cypress/e2e/example18.cy.ts +0 -431
- package/test/cypress/e2e/example19.cy.ts +0 -263
- package/test/cypress/e2e/example20.cy.ts +0 -264
- package/test/cypress/e2e/example21.cy.ts +0 -77
- package/test/cypress/e2e/example22.cy.ts +0 -94
- package/test/cypress/e2e/example23.cy.ts +0 -259
- package/test/cypress/e2e/example24.cy.ts +0 -707
- package/test/cypress/e2e/example25.cy.ts +0 -193
- package/test/cypress/e2e/example26.cy.ts +0 -111
- package/test/cypress/e2e/example27.cy.ts +0 -261
- package/test/cypress/e2e/example28.cy.ts +0 -740
- package/test/cypress/e2e/example29.cy.ts +0 -30
- package/test/cypress/e2e/example30.cy.ts +0 -757
- package/test/cypress/e2e/example31.cy.ts +0 -69
- package/test/cypress/e2e/example32.cy.ts +0 -272
- package/test/cypress/e2e/example33.cy.ts +0 -278
- package/test/cypress/e2e/example34.cy.ts +0 -84
- package/test/cypress/e2e/example35.cy.ts +0 -178
- package/test/cypress/e2e/example36.cy.ts +0 -219
- package/test/cypress/e2e/example37.cy.ts +0 -52
- package/test/cypress/e2e/example38.cy.ts +0 -160
- package/test/cypress/e2e/example39.cy.ts +0 -150
- package/test/cypress/e2e/example40.cy.ts +0 -126
- package/test/cypress/e2e/example41.cy.ts +0 -90
- package/test/cypress/e2e/example42.cy.ts +0 -82
- package/test/cypress/e2e/example43.cy.ts +0 -482
- package/test/cypress/e2e/example44.cy.ts +0 -458
- package/test/cypress/e2e/example45.cy.ts +0 -455
- package/test/cypress/e2e/home.cy.ts +0 -7
- package/test/cypress/fixtures/example.json +0 -5
- package/test/cypress/plugins/index.ts +0 -17
- package/test/cypress/plugins/utilities.ts +0 -28
- package/test/cypress/support/commands.ts +0 -88
- package/test/cypress/support/common.ts +0 -47
- package/test/cypress/support/drag.ts +0 -101
- package/test/cypress/support/index.ts +0 -20
- package/test/cypress/tsconfig.json +0 -9
- package/test/cypress.config.ts +0 -34
- package/test/mockSlickEvent.ts +0 -77
- package/test/rxjsResourceStub.ts +0 -69
- package/test/test-setup.ts +0 -6
- package/test/translateServiceStub.ts +0 -230
- package/test/translaterServiceStub.ts +0 -239
- package/test/tsconfig.json +0 -17
- package/test/vitest-global-mocks.ts +0 -41
- package/test/vitest-global-setup.ts +0 -3
- package/test/vitest-pretest.ts +0 -5
- package/tsconfig.app.json +0 -14
- package/tsconfig.json +0 -31
- package/tsconfig.spec.json +0 -11
- package/types/sortablejs.d.ts +0 -4
- package/vite.config.mts +0 -51
- /package/{dist/fesm2022 → fesm2022}/angular-slickgrid.mjs.map +0 -0
- /package/{dist/i18n → i18n}/en.json +0 -0
- /package/{dist/i18n → i18n}/fr.json +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/library → library}/components/angular-slickgrid.component.d.ts +0 -0
- /package/{dist/library → library}/constants.d.ts +0 -0
- /package/{dist/library → library}/extensions/index.d.ts +0 -0
- /package/{dist/library → library}/extensions/slickRowDetailView.d.ts +0 -0
- /package/{dist/library → library}/global-grid-options.d.ts +0 -0
- /package/{dist/library → library}/index.d.ts +0 -0
- /package/{dist/library → library}/models/angularComponentOutput.interface.d.ts +0 -0
- /package/{dist/library → library}/models/angularGridInstance.interface.d.ts +0 -0
- /package/{dist/library → library}/models/externalTestingDependencies.interface.d.ts +0 -0
- /package/{dist/library → library}/models/gridOption.interface.d.ts +0 -0
- /package/{dist/library → library}/models/index.d.ts +0 -0
- /package/{dist/library → library}/models/rowDetailView.interface.d.ts +0 -0
- /package/{dist/library → library}/modules/angular-slickgrid.module.d.ts +0 -0
- /package/{dist/library → library}/services/angularUtil.service.d.ts +0 -0
- /package/{dist/library → library}/services/container.service.d.ts +0 -0
- /package/{dist/library → library}/services/index.d.ts +0 -0
- /package/{dist/library → library}/services/translater.service.d.ts +0 -0
- /package/{dist/library → library}/services/utilities.d.ts +0 -0
- /package/{dist/library → library}/slickgrid-config.d.ts +0 -0
- /package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#### Index
|
|
2
|
-
- [Update Filters Dynamically](input-filter.md#update-filters-dynamically)
|
|
3
|
-
- [Custom Filter Predicate](input-filter.md#custom-filter-predicate)
|
|
4
|
-
|
|
5
|
-
### Description
|
|
6
|
-
Some users might want to have 1 main single search for filtering the grid data instead of using multiple column filters. You can see a demo of that below
|
|
7
|
-
|
|
8
|
-
### Code Sample
|
|
9
|
-
#### View
|
|
10
|
-
```html
|
|
11
|
-
<angular-slickgrid gridId="grid23" [columns]="columnDefinitions" [options]="gridOptions"
|
|
12
|
-
[dataset]="dataset" (onAngularGridCreated)="angularGridReady($event.detail)">
|
|
13
|
-
</angular-slickgrid>
|
|
14
|
-
|
|
15
|
-
<form class="form-inline">
|
|
16
|
-
<div class="form-group">
|
|
17
|
-
<label>Single Search: </label>
|
|
18
|
-
<select class="form-control" name="selectedColumn" [(ngModel)]="selectedColumn"
|
|
19
|
-
(ngModelChange)="updateFilter()">
|
|
20
|
-
<option [ngValue]="field" *ngFor="let field of columnDefinitions">{{field.name}}</option>
|
|
21
|
-
</select>
|
|
22
|
-
<select class="form-control" name="selectedOperator" [(ngModel)]="selectedOperator"
|
|
23
|
-
(ngModelChange)="updateFilter()">
|
|
24
|
-
<option [ngValue]="operator" *ngFor="let operator of operatorList">{{operator}}</option>
|
|
25
|
-
</select>
|
|
26
|
-
|
|
27
|
-
<input type="text" class="form-control" name="searchValue" placeholder="search value" autocomplete="off"
|
|
28
|
-
(input)="updateFilter()" [(ngModel)]="searchValue">
|
|
29
|
-
</div>
|
|
30
|
-
</form>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
##### ViewModel
|
|
34
|
-
```ts
|
|
35
|
-
export class MyComponent {
|
|
36
|
-
angularGrid: AngularGridInstance;
|
|
37
|
-
grid: any;
|
|
38
|
-
dataView: any;
|
|
39
|
-
columnDefinitions: Column[];
|
|
40
|
-
gridOptions: GridOption;
|
|
41
|
-
dataset: any[];
|
|
42
|
-
operatorList: OperatorString[] = ['=', '<', '<=', '>', '>=', '<>'];
|
|
43
|
-
selectedOperator = '=';
|
|
44
|
-
searchValue = '';
|
|
45
|
-
selectedColumn: Column;
|
|
46
|
-
|
|
47
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
48
|
-
this.angularGrid = angularGrid;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
updateFilter() {
|
|
52
|
-
if (this.selectedColumn && this.selectedOperator) {
|
|
53
|
-
const fieldName = this.selectedColumn.field;
|
|
54
|
-
const filter = {};
|
|
55
|
-
const filterArg: FilterCallbackArg = {
|
|
56
|
-
columnDef: this.selectedColumn,
|
|
57
|
-
operator: this.selectedOperator as OperatorString, // or fix one yourself like '='
|
|
58
|
-
searchTerms: [this.searchValue || '']
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
if (this.searchValue) {
|
|
62
|
-
// pass a columnFilter object as an object which it's property name must be a column field name (e.g.: 'duration': {...} )
|
|
63
|
-
filter[fieldName] = filterArg;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
this.angularGrid.dataView.setFilterArgs({
|
|
67
|
-
columnFilters: filter,
|
|
68
|
-
grid: this.angularGrid.slickGrid
|
|
69
|
-
});
|
|
70
|
-
this.angularGrid.dataView.refresh();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Sample
|
|
77
|
-

|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
You can style any (or all) of the Filter(s) when they have value, the lib will automatically add a `filled` CSS class which you can style as you see fit. There is no style by default, if you wish to add styling, you will be required to add your own.
|
|
2
|
-
|
|
3
|
-
## Styled Example
|
|
4
|
-

|
|
5
|
-
|
|
6
|
-
## Code example
|
|
7
|
-
For example, the print screen shown earlier was styled using this piece of SASS (`.scss`) code. You can customize the styling to your liking.
|
|
8
|
-
|
|
9
|
-
```scss
|
|
10
|
-
$slick-filled-filter-color: $slick-form-control-focus-border-color;
|
|
11
|
-
$slick-filled-filter-border: $slick-form-control-border;
|
|
12
|
-
$slick-filled-filter-box-shadow: $slick-form-control-focus-border-color;
|
|
13
|
-
$slick-filled-filter-font-weight: 400;
|
|
14
|
-
|
|
15
|
-
.slick-headerrow {
|
|
16
|
-
input.search-filter.filled,
|
|
17
|
-
.search-filter.filled input,
|
|
18
|
-
.search-filter.filled .date-picker input,
|
|
19
|
-
.search-filter.filled .input-group-addon.slider-value,
|
|
20
|
-
.search-filter.filled .input-group-addon.slider-range-value,
|
|
21
|
-
.search-filter.filled .input-group-addon select {
|
|
22
|
-
color: $slick-filled-filter-color;
|
|
23
|
-
font-weight: $slick-filled-filter-font-weight;
|
|
24
|
-
border: $slick-filled-filter-border;
|
|
25
|
-
box-shadow: $slick-filled-filter-box-shadow;
|
|
26
|
-
&.input-group-prepend {
|
|
27
|
-
border-right: 0;
|
|
28
|
-
}
|
|
29
|
-
&.input-group-append {
|
|
30
|
-
border-left: 0;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
.search-filter.filled .input-group-prepend select {
|
|
34
|
-
border-right: 0;
|
|
35
|
-
}
|
|
36
|
-
.search-filter.filled .ms-choice {
|
|
37
|
-
box-shadow: $slick-filled-filter-box-shadow;
|
|
38
|
-
border:$slick-filled-filter-border;
|
|
39
|
-
span {
|
|
40
|
-
font-weight: $slick-filled-filter-font-weight;
|
|
41
|
-
color: $slick-filled-filter-color;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
```
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# Formatters
|
|
2
|
-
|
|
3
|
-
#### Index
|
|
4
|
-
|
|
5
|
-
* [Built-in Formatter](#list-of-provided-formatters)
|
|
6
|
-
* [Extra Params/Arguments](#extra-argumentsparams)
|
|
7
|
-
* [Using Multiple Formatters](#using-multiple-formatters)
|
|
8
|
-
* [Custom Formatter](#custom-formatter)
|
|
9
|
-
- [Example of a Custom Formatter with HTML string](#example-of-a-custom-formatter-with-html-string)
|
|
10
|
-
- [Example with `FormatterResultObject` instead of a string](#example-with-formatterresultobject-instead-of-a-string)
|
|
11
|
-
- [Example of Custom Formatter with Native DOM Element](#example-of-custom-formatter-with-native-dom-element)
|
|
12
|
-
* [Common Formatter Options](#common-formatter-options)
|
|
13
|
-
* [PostRenderer Formatter](#postrender-formatter)
|
|
14
|
-
|
|
15
|
-
#### Definition
|
|
16
|
-
|
|
17
|
-
`Formatters` are functions that can be used to change and format certain column(s) in the grid. Please note that it does not alter the input data, it simply changes the styling by formatting the data differently to the screen (what the user visually see).
|
|
18
|
-
|
|
19
|
-
A good example of a `Formatter` could be a timestamp or a `Date` object that we could format differently in the grid, for example using `Formatters.dateIso` or `Formatters.dateUs` which is more human readable.
|
|
20
|
-
|
|
21
|
-
#### Provided Formatters
|
|
22
|
-
|
|
23
|
-
`Slickgrid-Universal` ships with a few `Formatters` by default which helps with common fields, you can see the [entire list here](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/index.ts#L37).
|
|
24
|
-
|
|
25
|
-
> **Note** you might not need a Formatter when simple CSS styling and class might be enough, think about using `cssClass` column property as much as possible since it has much better perf.
|
|
26
|
-
> For example: `{ cssClass: 'text-right' }` on your column definition (or any other class) to align on the right.
|
|
27
|
-
|
|
28
|
-
**List of provided `Formatters`**
|
|
29
|
-
|
|
30
|
-
* `Formatters.arrayObjectToCsv`: Takes an array of complex objects and converts it to a comma delimited string.
|
|
31
|
-
* you also need to pass the property name(s) for the complex object, i.e.: `formatter: Formatters.arrayObjectToCsv, params: { propertyNames: ['name'], useFormatterOuputToFilter: true }`
|
|
32
|
-
* `Formatters.arrayToCsv` : takes an array of text and returns it as CSV string
|
|
33
|
-
* `Formatters.checkmarkMaterial` will display a checkmark icon when value is truthy using Material Design icons
|
|
34
|
-
* `Formatters.collection`: Looks up values from the columnDefinition.params.collection property and displays the label in CSV or string format
|
|
35
|
-
* `Formatters.complexObject`: takes a complex object (with a `field` that has a `.` notation) and pull correct value, there are multiple ways to use it
|
|
36
|
-
1. `{ id: 'firstName', field: 'user.firstName', formatter: Formatters.complexObject}`, will display the user's first name
|
|
37
|
-
2. `{ id: 'firstName', field: 'user', labelKey: 'firstName', params: { complexField: 'user' }, ... }`
|
|
38
|
-
3. `{ id: 'firstName', field: 'user', params: { complexField: 'user.firstName' }, ... }`
|
|
39
|
-
* `Formatters.currency`: will help with currency other than dollar (ie `€`), there are multiple `params` available for this formatter
|
|
40
|
-
* `currencyPrefix`, `currencySuffix`, `minDecimal`, `maxDecimal`, `numberPrefix`, `numberSuffix`, `decimalSeparator`, `thousandSeparator` and `displayNegativeNumberWithParentheses`
|
|
41
|
-
* the distinction between `numberPrefix` and `currencyPrefix` can be seen when using `displayNegativeNumberWithParentheses`, for example if we have a value of `-12.432` with the `Formatters.currency` and `params: { currencyPrefix: '€', numberPrefix: 'Price ', numberSuffix: 'EUR' }` the output will be `"Price (€12.432) EUR"`
|
|
42
|
-
* `Formatters.dateEuro`: Takes a Date object and displays it as an Euro Date format (DD/MM/YYYY)
|
|
43
|
-
* `Formatters.dateTimeEuro`: Takes a Date object and displays it as an Euro Date+Time format (DD/MM/YYYY HH:mm:ss)
|
|
44
|
-
* `Formatters.dateTimeShortEuro`: Takes a Date object and displays it as an Euro Date+Time (without seconds) format (DD/MM/YYYY HH:mm)
|
|
45
|
-
* `Formatters.dateTimeEuroAmPm`: Takes a Date object and displays it as an Euro Date+Time+(am/pm) format (DD/MM/YYYY hh:mm:ss a)
|
|
46
|
-
* `Formatters.dateIso` : Takes a Date object and displays it as an ISO Date format (YYYY-MM-DD)
|
|
47
|
-
* `Formatters.dateTimeIso` : Takes a Date object and displays it as an ISO Date+Time format (YYYY-MM-DD HH:mm:ss)
|
|
48
|
-
* `Formatters.dateTimeIsoAmPm` : Takes a Date object and displays it as an ISO Date+Time+(am/pm) format (YYYY-MM-DD h:mm:ss a)
|
|
49
|
-
* `Formatters.dateTimeShortIso`: Takes a Date object and displays it as an ISO Date+Time (without seconds) format (YYYY-MM-DD HH:mm)
|
|
50
|
-
* `Formatters.dateUs` : Takes a Date object and displays it as an US Date format (MM/DD/YYYY)
|
|
51
|
-
* `Formatters.dateTimeUs` : Takes a Date object and displays it as an US Date+Time format (MM/DD/YYYY HH:mm:ss)
|
|
52
|
-
* `Formatters.dateTimeShortUs`: Takes a Date object and displays it as an US Date+Time (without seconds) format (MM/DD/YYYY HH:mm:ss)
|
|
53
|
-
* `Formatters.dateTimeUsAmPm` : Takes a Date object and displays it as an US Date+Time+(am/pm) format (MM/DD/YYYY hh:mm:ss a)
|
|
54
|
-
* `Formatters.dateUtc` : Takes a Date object and displays it as a TZ format (YYYY-MM-DDThh:mm:ssZ)
|
|
55
|
-
* `Formatters.date`: Base Date Formatter, this formatter is a bit different compare to other date formatter since this one requires the user to provide a custom format in `params.dateFormat`
|
|
56
|
-
- for example: `{ type: 'date', formatter: Formatters.date, params: { dateFormat: 'MMM DD, YYYY' }}`
|
|
57
|
-
* `Formatters.decimal`: Display the value as x decimals formatted, defaults to 2 decimals. You can pass "minDecimal" and/or "maxDecimal" to the "params" property.
|
|
58
|
-
* `Formatters.dollar`: Display the value as 2 decimals formatted with dollar sign '$' at the end of of the value.
|
|
59
|
-
* `Formatters.dollarColored`: Display the value as 2 decimals formatted with dollar sign '$' at the end of of the value, change color of text to red/green on negative/positive value
|
|
60
|
-
* `Formatters.dollarColoredBoldFormatter`: Display the value as 2 decimals formatted with dollar sign '$' at the end of of the value, change color of text to red/green on negative/positive value, show it in bold font weight as well
|
|
61
|
-
* `Formatters.hyperlink`: takes a URL cell value and wraps it into a clickable hyperlink `<a href="value">value</a>`
|
|
62
|
-
* the cell value **must contain** (`ftp://abc`, `http://abc` or `https://abc`), if it doesn't then use `fakeHyperlink`
|
|
63
|
-
* `Formatters.hyperlinkUriPrefix`: format a URI prefix into an hyperlink
|
|
64
|
-
* `Formatters.icon`: to display an icon with defined CSS class name, use `params` to pass a `cssClass` property
|
|
65
|
-
* `Formatters.iconBoolean`: similar to `icon` but will only be displayed on a Boolean truthy value, use `params` to pass a `cssClass` property
|
|
66
|
-
* `Formatters.mask`: to change the string output using a mask, use `params` to pass a `mask` property
|
|
67
|
-
* example: `{ field: 'phone', formatter: Formatters.mask, params: { mask: '(000) 000-0000' }}`
|
|
68
|
-
* `Formatters.multiple`: pipe multiple formatters (executed in sequence), use `params` to pass the list of formatters.
|
|
69
|
-
* example: `{ field: 'title', formatter: Formatters.multiple, params: { formatters: [ Formatters.lowercase, Formatters.uppercase ] }`
|
|
70
|
-
* `Formatters.percent`: Takes a cell value number (between 0.0-1.0) and displays a red (<50) or green (>=50) bar
|
|
71
|
-
* `Formatters.percentComplete` : takes a percentage value (0-100%), displays a bar following this logic:
|
|
72
|
-
* `red`: < 30%, `grey`: < 70%, `green`: >= 70%
|
|
73
|
-
* `Formatters.percentCompleteBar` : same as `percentComplete` but uses [Bootstrap - Progress Bar with label](https://getbootstrap.com/docs/3.3/components/#progress-label).
|
|
74
|
-
* `Formatters.percentCompleteBarWithText`: Takes a cell value number (between 0-100) and displays SlickGrid custom "percent-complete-bar" with Text a red (<30), silver (>30 & <70) or green (>=70) bar
|
|
75
|
-
* `Formatters.percentSymbol`: Takes a cell value number (between 0-100) and add the "%" after the number
|
|
76
|
-
* `Formatters.progressBar`: Takes a cell value number (between 0-100) and displays Bootstrap "progress-bar" a red (<30), silver (>30 & <70) or green (>=70) bar
|
|
77
|
-
* `Formatters.translate`: Takes a cell value and translates it (i18n). Requires an instance of the Translate Service:: \`i18n: translate
|
|
78
|
-
* `Formatters.translateBoolean`: Takes a boolean value, cast it to upperCase string and finally translates it (i18n).
|
|
79
|
-
* `Formatters.tree`: Formatter that must be used when the column is a Tree Data column
|
|
80
|
-
|
|
81
|
-
> **Note:** The list might not be up to date (especially for Dates), please refer to the [Formatters export](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/index.ts#L37) to know exactly which formatters are available.
|
|
82
|
-
|
|
83
|
-
> **Note** all Date formatters are formatted using [Tempo](https://tempo.formkit.com/#format-tokens). There are also many more Date formats not shown above, simply visit the [formatters.index](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/formatters.index.ts#L101) to see all available Date/Time formats.
|
|
84
|
-
|
|
85
|
-
### Usage
|
|
86
|
-
To use any of them, you simply need to import `Formatters` from `Slickgrid-Universal` and add a `formatter: Formatters.xyz` (where `xyx` is the name of the built-in formatter) in your column definitions as shown below:
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
import { Formatters } from 'angular-slickgrid';
|
|
90
|
-
|
|
91
|
-
export class GridBasicComponent implements OnInit {
|
|
92
|
-
columnDefinitions: Column[];
|
|
93
|
-
gridOptions: GridOption;
|
|
94
|
-
dataset: any[];
|
|
95
|
-
|
|
96
|
-
ngOnInit(): void {
|
|
97
|
-
this.columnDefinitions = [
|
|
98
|
-
{ id: 'title', name: 'Title', field: 'title' },
|
|
99
|
-
{ id: 'duration', name: 'Duration (days)', field: 'duration' },
|
|
100
|
-
{ id: '%', name: '% Complete', field: 'percentComplete', formatter: Formatters.percentComplete },
|
|
101
|
-
{ id: 'start', name: 'Start', field: 'start', formatter: Formatters.dateIso },
|
|
102
|
-
{ id: 'finish', name: 'Finish', field: 'finish', formatter: Formatters.dateIso },
|
|
103
|
-
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', formatter: Formatters.checkmark }
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
#### Extra Arguments/Params
|
|
110
|
-
|
|
111
|
-
What if you want to pass extra arguments that you want to use within the Formatter? You can use `params` for that. For example, let say you have a custom formatter to build a select list (dropdown), you could do it this way:
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
let optionList = ['True', 'False'];
|
|
115
|
-
|
|
116
|
-
this.columnDefinitions = [
|
|
117
|
-
{ id: 'title', field: 'title',
|
|
118
|
-
headerTranslate: 'TITLE',
|
|
119
|
-
formatter: myCustomSelectFormatter,
|
|
120
|
-
params: { options: optionList }
|
|
121
|
-
},
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Using Multiple Formatters
|
|
125
|
-
|
|
126
|
-
SlickGrid only has 1 `formatter` property but if you want to use more than 1 Formatter then you'll want to use the `Formatters.multiple` and pass every Formatters inside your column definition `params: { formatters: [] }` as shown below.
|
|
127
|
-
|
|
128
|
-
**Note:** please note that combining multiple Formatters has the side effect of cascading the formatted `value` output to the next Formatter. So for example if you use the `complexObject` and `dollar` Formatters, you want to make sure to define them in the correct order in your `formatters: []` array as shown below.
|
|
129
|
-
|
|
130
|
-
* what if you want to avoid overwriting the `value` with a Custom Formatter?
|
|
131
|
-
* in that case you can have your Formatter return a [FormatterResultObject](#formatterresultobject), see below.
|
|
132
|
-
|
|
133
|
-
```ts
|
|
134
|
-
// Data Example::
|
|
135
|
-
// data = [{ shipping: { cost: 123.22, address: { zip: 123456 } } }];
|
|
136
|
-
|
|
137
|
-
this.columnDefinitions = [
|
|
138
|
-
{
|
|
139
|
-
id: 'shippingCost', field: 'shipping.cost', name: 'Shipping Cost',
|
|
140
|
-
formatter: Formatters.multiple,
|
|
141
|
-
params: {
|
|
142
|
-
// list of Formatters (the order is very important)
|
|
143
|
-
formatters: [Formatters.complexObject, Formatters.dollar],
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
];
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Custom Formatter
|
|
150
|
-
|
|
151
|
-
You could also create your own custom `Formatter` by simply following the structure shown below.
|
|
152
|
-
|
|
153
|
-
#### TypeScript function signature
|
|
154
|
-
|
|
155
|
-
```ts
|
|
156
|
-
export type Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any, grid?: any) => string | FormatterResultObject;
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
#### FormatterResultObject
|
|
160
|
-
|
|
161
|
-
The most common return result of a Formatter is a `string` but you could also use the `FormatterResultObject` which is an object with the interface signature shown below. The main difference is that it will allow to add CSS classes directly to the cell container instead of having to create an extra `<div>` container and since that is the main cell container, you can add multiple Formatters to add/remove multiple CSS classes on that same container.
|
|
162
|
-
|
|
163
|
-
```ts
|
|
164
|
-
export interface FormatterResultObject {
|
|
165
|
-
addClasses?: string;
|
|
166
|
-
removeClasses?: string;
|
|
167
|
-
text: string;
|
|
168
|
-
toolTip?: string;
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Example of a Custom Formatter with HTML string
|
|
173
|
-
|
|
174
|
-
For example, we will use our optional SVG icons `.mdi` with a `boolean` as input data, and display a (fire) icon when `True` or a (snowflake) when `False`. This custom formatter is actually display in the [UI sample](#ui-sample) shown below.
|
|
175
|
-
```ts
|
|
176
|
-
// create a custom Formatter with the Formatter type
|
|
177
|
-
const myCustomCheckboxFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any) =>
|
|
178
|
-
value ? `<i class="mdi mdi-fire" aria-hidden="true"></i>` : '<i class="mdi mdi-snowflake" aria-hidden="true"></i>';
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
#### Example with `FormatterResultObject` instead of a string
|
|
182
|
-
|
|
183
|
-
Using this object return type will provide the user the same look and feel, it will actually be quite different. The major difference is that all of the options (`addClasses`, `tooltip`, ...) will be added the CSS container of the cell instead of the content of that container. For example a typically cell looks like the following `<div class="slick-cell l4 r4">Task 4</div>` and if use `addClasses: 'red'`, it will end up being `<div class="slick-cell l4 r4 red">Task 4</div>` while if we use a string output of let say `<span class="red">${value></span>`, then our final result of the cell will be `<div class="slick-cell l4 r4"><span class="red">Task 4</span></div>`. This can be useful if you plan to use multiple Formatters and don't want to lose or overwrite the previous Formatter result (we do that in our project).
|
|
184
|
-
|
|
185
|
-
```ts
|
|
186
|
-
// create a custom Formatter and returning a string and/or an object of type FormatterResultObject
|
|
187
|
-
const myCustomCheckboxFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any, grid?: any) =>
|
|
188
|
-
value ? { addClasses: 'mdi mdi-fire', text: '', tooltip: 'burning fire' } : '<i class="mdi mdi-snowflake" aria-hidden="true"></i>';
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Example of Custom Formatter with Native DOM Element
|
|
192
|
-
Since version 4.x, you can now also return native DOM element instead of an HTML string. There are 2 main reasons for going with this approach:
|
|
193
|
-
1. CSP Safe by default, since it's native it is 100% CSP Safe (CSP: Content Security Policy)
|
|
194
|
-
2. Performance (the reasons are similar to point 1.)
|
|
195
|
-
- since it's native it can be appended directly to the grid cell
|
|
196
|
-
- when it's an HTML string, it has to do 2 extra steps (which is an overhead process)
|
|
197
|
-
i. sanitize the string (when a sanitizer, for example [DOMPurify](https://github.com/cure53/DOMPurify))
|
|
198
|
-
ii. SlickGrid then has to convert it to native element by using `innerHTML` on the grid cell
|
|
199
|
-
|
|
200
|
-
Demo
|
|
201
|
-
```ts
|
|
202
|
-
export const iconFormatter: Formatter = (_row, _cell, _value, columnDef) => {
|
|
203
|
-
const iconElm = document.createElement('span');
|
|
204
|
-
iconElm.className = 'mdi mdi-check';
|
|
205
|
-
|
|
206
|
-
return iconElm;
|
|
207
|
-
};
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
> **Note** you could also use our helper `createDomElement` which allows to create a DOM element and pass properties like `className` in 1 liner (and it also works with intellisense). For example `createDomElement('span', { className: 'bold title', textContent: 'Hello World', title: 'some tooltip description' })` would equal to 4 lines of code.
|
|
211
|
-
|
|
212
|
-
#### More Complex Example
|
|
213
|
-
|
|
214
|
-
If you need to add more complex logic to a `Formatter`, you can take a look at the [percentCompleteBar](https://github.com/ghiscoding/slickgrid-universal/blob/master/packages/common/src/formatters/percentCompleteBarFormatter.ts) `Formatter` for more inspiration.
|
|
215
|
-
|
|
216
|
-
### Common Formatter Options
|
|
217
|
-
|
|
218
|
-
You can set some defined common Formatter Options in your Grid Options through the `formatterOptions` in the Grid Options (locally or globally) as seen below, and/or independently through the column definition `params` (the option names are the same in both locations)
|
|
219
|
-
|
|
220
|
-
```ts
|
|
221
|
-
loadGrid() {
|
|
222
|
-
this.columnDefinitions = [
|
|
223
|
-
// through the column definition "params"
|
|
224
|
-
{ id: 'price', field: 'price', params: { thousandSeparator: ',' } },
|
|
225
|
-
];
|
|
226
|
-
|
|
227
|
-
// or through grid options to make it global
|
|
228
|
-
this.gridOptions = {
|
|
229
|
-
autoResize: {
|
|
230
|
-
containerId: 'demo-container',
|
|
231
|
-
sidePadding: 15
|
|
232
|
-
},
|
|
233
|
-
enableAutoResize: true,
|
|
234
|
-
|
|
235
|
-
// you customize the date separator through "formatterOptions"
|
|
236
|
-
formatterOptions: {
|
|
237
|
-
// What separator to use to display a Date, for example using "." it could be "2002.01.01"
|
|
238
|
-
dateSeparator: '/', // can be any of '/' | '-' | '.' | ' ' | ''
|
|
239
|
-
|
|
240
|
-
// Defaults to dot ".", separator to use as the decimal separator, example $123.55 or $123,55
|
|
241
|
-
decimalSeparator: ',', // can be any of '.' | ','
|
|
242
|
-
|
|
243
|
-
// Defaults to false, option to display negative numbers wrapped in parentheses, example: -$12.50 becomes ($12.50)
|
|
244
|
-
displayNegativeNumberWithParentheses: true,
|
|
245
|
-
|
|
246
|
-
// Defaults to undefined, minimum number of decimals
|
|
247
|
-
minDecimal: 2,
|
|
248
|
-
|
|
249
|
-
// Defaults to undefined, maximum number of decimals
|
|
250
|
-
maxDecimal: 4,
|
|
251
|
-
|
|
252
|
-
// Defaults to undefined, add a prefix when using `Formatters.decimal` (only) which can be used for example to display a currency.
|
|
253
|
-
// output: € 123.45'
|
|
254
|
-
numberPrefix: '€ ',
|
|
255
|
-
|
|
256
|
-
// Defaults to undefined, add a suffix when using `Formatters.decimal` (only) which can be used for example to display a currency.
|
|
257
|
-
// output: '123.45 €'
|
|
258
|
-
numberSuffix: ' €',
|
|
259
|
-
|
|
260
|
-
// Defaults to empty string, thousand separator on a number. Example: 12345678 becomes 12,345,678
|
|
261
|
-
thousandSeparator: '_', // can be any of ',' | '_' | ' ' | ''
|
|
262
|
-
},
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### Using Angular Component with `asyncPostRenderer`
|
|
268
|
-
|
|
269
|
-
First of... Why can't we use Angular Component with Customer Formatters? Because of how Angular is built, it requires a full cycle for the component to be rendered with data, however SlickGrid Formatter requires only string output and it must be right away (synchronous) and Angular Component can only be returned in an async fashion (you could return it right away but the data won't be populated). That is the reason that it's not doable with a Formatter, however SlickGrid offers `asyncPostRender` which is similar to a Formatter and works in an async fashion. So that works, but it has some drawback, since it's async, it is slightly slower to render (you might visually see it rendering on the screen). All that to say, regular Formatters with jQuery and/or HTML is still the preferred way (at least to me)... but hey, if you really wish to use Angular Component, well then it's possible, just remember it's async though and slightly slower to render.
|
|
270
|
-
|
|
271
|
-
Also note that the limitation that a Custom Formatters only accepts String comes from the core lib (SlickGrid) and there's nothing Angular-Slickgrid can change about that (or if you know how to overcome this issue then please create a PR), the only alternative, like I said earlier, is to use `asyncPostRender` with it's drawback (it's slightly slower to render).
|
|
272
|
-
|
|
273
|
-
To avoid performance issues and memory leaks, it'd be preferable to use `asyncPostRenderCleanup`. When scrolling through your data, it allows Slickgrid to remove hidden lines' Angular Components. In your grid options, add `enableAsyncPostRenderCleanup: true` to activate it. Please note that it **doesn't** call `ngOnDestroy()`. If you want to, you can keep all Angular Component instances created in `asyncPostRender` and call the right instance's `destroy()` method in `asyncPostRenderCleanup`. The following implementation might add a heavy load on your RAM depending on the number of Angular component instances your grid needs.
|
|
274
|
-
|
|
275
|
-
```ts
|
|
276
|
-
import { ComponentRef, Injectable } from '@angular/core';
|
|
277
|
-
import { AngularComponentOutput, AngularUtilService, Column } from 'angular-slickgrid';
|
|
278
|
-
import { MyCustomComponent } from 'my-custom-component/my-custom-component.component';
|
|
279
|
-
|
|
280
|
-
export interface AngularCells {
|
|
281
|
-
[id: string]: ComponentRef<any>
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
@Injectable()
|
|
285
|
-
export class ColumnDefinitionsService {
|
|
286
|
-
private _angularCells: AngularCells = {};
|
|
287
|
-
|
|
288
|
-
constructor(private _angularUtilService: AngularUtilService) {}
|
|
289
|
-
|
|
290
|
-
private _setColumnsConfiguration(columns: Column[]): void {
|
|
291
|
-
columns.forEach(col => {
|
|
292
|
-
col.asyncPostRender = this._renderAngularComponent.bind(this);
|
|
293
|
-
col.asyncPostRenderCleanup = this._cleanupAngularComponent.bind(this);
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
private _renderAngularComponent(cellNode: HTMLElement, row: number, dataContext: any, colDef: Column): void {
|
|
298
|
-
const componentOutput: AngularComponentOutput = this._angularUtilService.createAngularComponent(MyCustomComponent );
|
|
299
|
-
Object.assign(componentOutput.componentRef.instance, {
|
|
300
|
-
[FILL YOUR INPUTS AND OUTPUTS HERE]
|
|
301
|
-
myInput: row
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
const id: string = `${row}-${colDef.field}`; // Gives a unique id to each cell
|
|
305
|
-
this._angularCells[id] = componentOutput.componentRef; // Assigns the component instance to the matching cell's id
|
|
306
|
-
$(cellNode).empty();
|
|
307
|
-
setTimeout(() => $(cellNode).html(componentOutput.domElement));
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
private _cleanupAngularComponent(cellNode: HTMLElement, row: number, colDef: Column): void {
|
|
311
|
-
const id: string = `${row}-${colDef.field}`;
|
|
312
|
-
const component: ComponentRef<any> = this._angularCells[id];
|
|
313
|
-
|
|
314
|
-
component?.destroy();
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
A **Better Solution** is to use Custom Formatters **as much as possible** because using an Angular Components with `asyncPostRender` are **SLOW** (you are warned). They are slow because they require a full cycle, cannot be cached and are rendered **after** each rows are rendered (because of their asynchronous nature), while Custom Formatters are rendered at the same time as the row itself since they are synchronous in nature.
|
|
320
|
-
|
|
321
|
-
**Examples**
|
|
322
|
-
|
|
323
|
-
* [Example 22](https://ghiscoding.github.io/Angular-Slickgrid/#/angular-components) | [Component](../../src/app/examples/grid-angular.component.ts) | [animated gif](https://user-images.githubusercontent.com/643976/53061045-87346580-348a-11e9-95f3-dfe33be6e966.gif)
|
|
324
|
-
|
|
325
|
-
In the [animated gif](https://user-images.githubusercontent.com/643976/53061045-87346580-348a-11e9-95f3-dfe33be6e966.gif), you can see the 3rd column is using `asyncPostRender` and before it gets rendered we show 3 dots (...), and if you look carefully you can see them being rendered before the actual result, it's short but it is visible.
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
#### Index
|
|
2
|
-
- [Usage](#usage)
|
|
3
|
-
- [Sorting Complex Objects](#how-to-sort-complex-objects)
|
|
4
|
-
- [Custom Sort Comparer](#custom-sort-comparer)
|
|
5
|
-
- [Update Sorting Dynamically](#update-sorting-dynamically)
|
|
6
|
-
- [Dynamic Query Field](#dynamic-query-field)
|
|
7
|
-
- [Sorting Dates](#sorting-dates)
|
|
8
|
-
- [Pre-Parse Date Columns for better perf](#pre-parse-date-columns-for-better-perf)
|
|
9
|
-
|
|
10
|
-
### Demo
|
|
11
|
-
[Demo Page](https://ghiscoding.github.io/Angular-Slickgrid/#/clientside) / [Demo Component](https://github.com/ghiscoding/slickgrid-universal/blob/master/frameworks/angular-slickgrid/src/demos/examples/grid-clientside.component.ts)
|
|
12
|
-
|
|
13
|
-
### Description
|
|
14
|
-
Sorting on the client side is really easy, you simply need to enable `sortable` (when not provided, it is considered as disabled) on each columns you want to sort and it will sort as a type string. Oh but wait, sorting as string might not always be ideal, what if we want to sort by number or by date? The answer is to simply pass a `type` as shown below.
|
|
15
|
-
|
|
16
|
-
### Usage
|
|
17
|
-
To use any of them, you can use the `FieldType` interface or enter a type via a string as shown below. Also please note that `'string'` is the default and you don't necessarily need to define it, though you could if you wish to see it in your column definition.
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import { FieldType } from 'angular-slickgrid';
|
|
21
|
-
|
|
22
|
-
export class GridBasicComponent implements OnInit {
|
|
23
|
-
columnDefinitions: Column[];
|
|
24
|
-
gridOptions: GridOption;
|
|
25
|
-
dataset: any[];
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
this.columnDefinitions = [
|
|
29
|
-
{ id: 'title', name: 'Title', field: 'title', sortable: true },
|
|
30
|
-
{ id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: 'number' },
|
|
31
|
-
{ id: '%', name: '% Complete', field: 'percentComplete', sortable: true, type: 'float'},
|
|
32
|
-
{ id: 'start', name: 'Start', field: 'start', sortable: true, type: 'dateIso' },
|
|
33
|
-
{ id: 'finish', name: 'Finish', field: 'finish', sortable: true, type: 'dateIso' },
|
|
34
|
-
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', sortable: true }
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### How to Sort Complex Objects?
|
|
41
|
-
You can sort complex objects using the dot (.) notation inside the `field` property defined in your Columns Definition.
|
|
42
|
-
|
|
43
|
-
For example, let say that we have this dataset
|
|
44
|
-
```typescript
|
|
45
|
-
const dataset = [
|
|
46
|
-
{ item: 'HP Desktop', buyer: { id: 1234, address: { street: '123 Belleville', zip: 123456 }} },
|
|
47
|
-
{ item: 'Lenovo Mouse', buyer: { id: 456, address: { street: '456 Hollywood blvd', zip: 789123 }} }
|
|
48
|
-
];
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
We can now filter the zip code from the buyer's address using this filter:
|
|
52
|
-
```typescript
|
|
53
|
-
this.columnDefinitions = [
|
|
54
|
-
{
|
|
55
|
-
// the zip is a property of a complex object which is under the "buyer" property
|
|
56
|
-
// it will use the "field" property to explode (from "." notation) and find the child value
|
|
57
|
-
id: 'zip', name: 'Zip Code', field: 'buyer.address.zip', sortable: true
|
|
58
|
-
}
|
|
59
|
-
// { id: 'street', ... },
|
|
60
|
-
];
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Custom Sort Comparer
|
|
64
|
-
If the builtin sort comparer methods are not sufficient for your use case, you could add your own custom Sort Comparer in your Column Definitions as shown below. Note that we are only showing a simple numeric sort, just adjust it to your needs.
|
|
65
|
-
|
|
66
|
-
```ts
|
|
67
|
-
this.columnDefinitions = [{
|
|
68
|
-
id: 'myField', name: 'My Field',
|
|
69
|
-
sorter: (a, b) => a > b ? 1 : -1,
|
|
70
|
-
}];
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
similarly with a complex object
|
|
74
|
-
|
|
75
|
-
```ts
|
|
76
|
-
// data = { user: { firstName: 'John', lastName: 'Doe', fullName: 'John Doe' }, address: { zip: 123456 } }};
|
|
77
|
-
|
|
78
|
-
this.columnDefinitions = [{
|
|
79
|
-
id: 'firstName', name: 'First Name', field: 'user.firstName',
|
|
80
|
-
sorter: (a, b) => a.fullName > b.fullName ? 1 : -1,
|
|
81
|
-
}];
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Update Sorting Dynamically
|
|
85
|
-
You can update/change the Sorting dynamically (on the fly) via the `updateSorting` method from the `SortService`. Note that calling this method will override all sorting (sorters) and replace them with the new array of sorters provided. For example, you could update the sorting from a button click or a select dropdown list with predefined filter set.
|
|
86
|
-
|
|
87
|
-
##### View
|
|
88
|
-
```html
|
|
89
|
-
<button class="btn btn-default btn-sm" data-test="set-dynamic-sorting" (click)="setSortingDynamically()">
|
|
90
|
-
Set Sorting Dynamically
|
|
91
|
-
</button>
|
|
92
|
-
|
|
93
|
-
<angular-slickgrid gridId="grid1"
|
|
94
|
-
[columns]="columnDefinitions"
|
|
95
|
-
[options]="gridOptions"
|
|
96
|
-
[dataset]="dataset"
|
|
97
|
-
(onAngularGridCreated)="angularGridReady($event.detail)">
|
|
98
|
-
</angular-slickgrid>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
##### Component
|
|
102
|
-
```ts
|
|
103
|
-
export class Example {
|
|
104
|
-
angularGrid: AngularGridInstance;
|
|
105
|
-
|
|
106
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
107
|
-
this.angularGrid = angularGrid;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
setSortingDynamically() {
|
|
111
|
-
this.angularGrid.sortService.updateSorting([
|
|
112
|
-
// orders matter, whichever is first in array will be the first sorted column
|
|
113
|
-
{ columnId: 'duration', direction: 'ASC' },
|
|
114
|
-
{ columnId: 'start', direction: 'DESC' },
|
|
115
|
-
]);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
#### Extra Arguments
|
|
121
|
-
The `updateSorting` method has 2 extra arguments:
|
|
122
|
-
- 2nd argument, defaults to true, is to emit a sort changed event (the GridStateService uses this event)
|
|
123
|
-
- optional and defaults to true `updateSorting([], true)`
|
|
124
|
-
- 3rd argument is to trigger a backend query (when using a Backend Service like OData/GraphQL), this could be useful when using updateFilters & updateSorting and you wish to only send the backend query once.
|
|
125
|
-
- optional and defaults to true `updateSorting([], true, true)`
|
|
126
|
-
|
|
127
|
-
### Dynamic Query Field
|
|
128
|
-
What if you a field that you only know which field to query only at run time and depending on the item object (`dataContext`)?
|
|
129
|
-
We can defined a `queryFieldNameGetterFn` callback that will be executed on each row when Filtering and/or Sorting.
|
|
130
|
-
```ts
|
|
131
|
-
queryFieldNameGetterFn: (dataContext) => {
|
|
132
|
-
// do your logic and return the field name will be queried
|
|
133
|
-
// for example let say that we query "profitRatio" when we have a profit else we query "lossRatio"
|
|
134
|
-
return dataContext.profit > 0 ? 'profitRatio' : 'lossRatio';
|
|
135
|
-
},
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Sorting Dates
|
|
139
|
-
|
|
140
|
-
Date sorting should work out of the box as long as you provide the correct column field type. Note that there are various field types that can be provided and they all do different things. For the Sorting to work properly, you need to make sure to use the correct type for Date parsing to work accordingly. Below is a list of column definition types that you can provide:
|
|
141
|
-
|
|
142
|
-
- `type`: input/output of date fields, or in other words, parsing/formatting dates with the field `type` provided
|
|
143
|
-
- `outputType`: when a `type` is provided for parsing (i.e. from your dataset), you could use a different `outputType` to format your date differently
|
|
144
|
-
- `saveOutputType`: if you already have a `type` and an `outputType` but you wish to save your date (i.e. save to DB) in yet another format
|
|
145
|
-
|
|
146
|
-
### Pre-Parse Date Columns for better perf
|
|
147
|
-
##### requires v8.8.0 and higher
|
|
148
|
-
|
|
149
|
-
Sorting very large dataset with dates can be extremely slow when dates formated date strings, the reason is because these strings need to first be parsed and converted to real JS Dates before the Sorting process can actually happen (i.e. US Date Format). However parsing a large dataset can be slow **and** to make it worst, a Sort will revisit the same items over and over which mean that the same date strings will have to be reparsed over and over (for example while trying to Sort a dataset of 100 items, I saw some items being revisit 10 times and I can only imagine that it is exponentially worst with a large dataset).
|
|
150
|
-
|
|
151
|
-
So what can we do to make this faster with a more reasonable time? Well, we can simply pre-parse all date strings once and only once and convert them to JS Date objects. Then once we get Date objects, we'll simply read the UNIX timestamp which is what we need to Sort. The first pre-parse takes a bit of time and will be executed only on the first date column Sort (any sort afterward will read the pre-parsed Date objects).
|
|
152
|
-
|
|
153
|
-
What perf do we get with pre-parsing versus regular non-parsing? The benchmark was pulled using 50K items with 2 date columns (with US date format)
|
|
154
|
-
- without non-parsing: ~15sec
|
|
155
|
-
- with pre-parsing: ~1.4sec (1st pre-parse) and any subsequent Date sort is about ~0.2sec => so about ~1.5sec total
|
|
156
|
-
|
|
157
|
-
The summary, is that we get a 10x boost **but** not only that, we also get an extremely fast subsequent sort afterward (sorting Date objects is as fast as sorting Numbers).
|
|
158
|
-
|
|
159
|
-
#### Usage
|
|
160
|
-
|
|
161
|
-
You can use the `preParseDateColumns` grid option, it can be set as either a `boolean` or a `string` but there's a big distinction between the 2 approaches as shown below (note that both approaches will mutate the dataset).
|
|
162
|
-
1. `string` (i.e. set to `"__"`, it will parse a `"start"` date string and assign it as a `Date` object to a new `"__start"` prop)
|
|
163
|
-
2. `boolean` (i.e. parse `"start"` date string and reassign it as a `Date` object on the same `"start"` prop)
|
|
164
|
-
|
|
165
|
-
> **Note** this option **does not work** with the Backend Service API because it simply has no effect.
|
|
166
|
-
|
|
167
|
-
For example if our dataset has 2 columns named "start" and "finish", then pre-parse the dataset,
|
|
168
|
-
|
|
169
|
-
with the 1nd approach (`string`), let's use `"__"` (which is in reality a prefix) it will mutate the dataset by adding new props (where `Date` is a `Date` object)
|
|
170
|
-
|
|
171
|
-
```diff
|
|
172
|
-
data = [
|
|
173
|
-
- { id: 0, start: '02/28/24', finish: '03/02/24' },
|
|
174
|
-
- { id: 1, start: '01/14/24', finish: '02/13/24' },
|
|
175
|
-
+ { id: 0, start: '02/28/24', finish: '03/02/24', __start: Date, __finish: Date },
|
|
176
|
-
+ { id: 1, start: '01/14/24', finish: '02/13/24', __start: Date, __finish: Date },
|
|
177
|
-
]
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
with the 2nd approach (`boolean`), it will instead mutate the dataset by overwriting the same properties
|
|
181
|
-
|
|
182
|
-
```diff
|
|
183
|
-
data = [
|
|
184
|
-
- { id: 0, start: '02/28/24', finish: '03/02/24' },
|
|
185
|
-
- { id: 1, start: '01/14/24', finish: '02/13/24' },
|
|
186
|
-
+ { id: 0, start: Date, finish: Date },
|
|
187
|
-
+ { id: 1, start: Date, finish: Date },
|
|
188
|
-
]
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Which approach to choose? Both have pros and cons, overwriting the same props might cause problems with the column `type` that you use, you will have to give it a try yourself. On the other hand, with the other approach, it will duplicate all date properties and take a bit more memory usage and when changing cells we'll need to make sure to keep these props in sync, however you will likely have less `type` issues.
|
|
192
|
-
|
|
193
|
-
What happens when we do any cell changes (for our use case, it would be Create/Update), for any Editors we simply subscribe to the `onCellChange` change event and we re-parse the date strings when detected. We also subscribe to certain CRUD functions as long as they come from the `GridService` then all is fine... However, if you use the DataView functions directly then we have no way of knowing when to parse because these functions from the DataView don't have any events. Lastly, if we overwrite the entire dataset, we will also detect this (via an internal flag) and the next time you sort a date then the pre-parse kicks in again.
|
|
194
|
-
|
|
195
|
-
#### Can I call the pre-parse myself?
|
|
196
|
-
|
|
197
|
-
Yes, if for example you want to pre-parse right after the grid is loaded, you could call the pre-parse yourself for either all items or a single item
|
|
198
|
-
- all item pre-parsing: `this.sgb.sortService.preParseAllDateItems();`
|
|
199
|
-
- the items will be read directly from the DataView
|
|
200
|
-
- a single item parsing: `this.sgb.sortService.preParseSingleDateItem(item);`
|