npm install scalejs.slick-grid-wrapper --save
- Import 'slick-grid-wrapper' before the view is rendered so that the custom knockout binding is registered. In ScaleJS 2.0, we recommend importing this file in 'scalejs.extensions.js'.
- In your HTML add the custom binding 'slickGridWrapper' to the element that will contain the grid.
- Expose the data from the viewModel to the view (more specific details forthcoming).
- Assuming you're using Webpack, you will need to update two parts of your webpack.config file, alias and loaders. Update Alias as follows:
And in the loaders:
test: /slick.core/loader: 'imports?jQuery=jquery,$=jquery,this=>window'test: /slick.grid.js/loader: 'exports?Slick!imports?slickCore,jQuery=jquery,$=jquery,jqm=jquery-mousewheel,this=>window'
The filtering logic has been simplified to only support a user applying a filter from the input boxes in each column at the top of the grid. The simplified file is named observableFiltersInlineFiltering.js. The original file which supported advanced filtering, with a separate popup window, is in observableFiltersAdvancedFiltering.js. This is only saved as a reference and is not used anywhere.