Slick Grid wrapped in directive (angular), some parameters do not work (resize and drag columns)

When I included the Slick Grid plugin in the directive, some Slick Grid options (resizing and dragging columns) do not work. I think these events may be contrary to the directive. Does anyone have an understanding?

my html:

<div style="width:600px;height:500px;" s-grid></div> 

my directive:

 angular.module('slickGrid.directive', []) .directive('sGrid', [function () { return { restrict: 'EA', link : function(scope, element, attrs){ // for clearer present I initialize data right in directive // start init data var columns = [ {id: "title", name: "Title", field: "title"}, {id: "duration", name: "Duration", field: "duration"}, {id: "%", name: "% Complete", field: "percentComplete"}, {id: "start", name: "Start", field: "start"}, {id: "finish", name: "Finish", field: "finish"}, {id: "effort-driven", name: "Effort Driven", field: "effortDriven"} ]; var options = { enableCellNavigation: true, enableColumnReorder: true }; var data = []; for (var i = 0; i < 50000; i++) { var d = (data[i] = {}); d["id"] = "id_" + i; d["num"] = i; d["title"] = "Task " + i; d["duration"] = "5 days"; d["percentComplete"] = Math.round(Math.random() * 100); d["start"] = "01/01/2009"; d["finish"] = "01/05/2009"; d["effortDriven"] = (i % 5 == 0); } // end init data // finally render layout scope.grid = new Slick.Grid(element, data, columns, options); } } }]); 
+4
source share
2 answers

my errors are resolved, after some time for research, I found a solution here Uncaught TypeError: Cannot read the "msie" property from undefined

My new version of jquery (1.9.1) caused this problem.

+1
source

You need to enable jQuery UI to use the resize / reorder SlickGrid columns.

0
source

Source: https://habr.com/ru/post/1497166/


All Articles