handsontable

Updating multiple rows on a large handsontable locks chrome

試著忘記壹切 提交于 2019-12-13 04:23:45
问题 I have a handson table with 300+. It renders quickly. However, if I update one column in all rows like so: function() { console.trace("Start", new Date()); $scope.myData.forEach(function(elem, idx) { elem.properties.myCol = Math.random(); if (idx % 100 == 0) console.trace("Tick", new Date()); }); console.trace("End", new Date()); }; The loop executes in less than a second, but the browser tab locks up and the page does not update for over a minute. Is there some way I can disable handsontable

Handsontable delete multiple rows

天大地大妈咪最大 提交于 2019-12-13 02:41:04
问题 I am new to Handsontable. I am trying to delete multiple selected table rows using ' getSelected ' and ' alter ' methods (remove_row). However, with my code below I am getting the error "selection" not defined in Firebug and "Uncaught TypeError: Cannot read property '0' of undefined " in Chrome. It doesn't matter which row I select or how many. I still get the error and no rows are deleted. What am I doing wrong please? $(document).ready(function () { var myData = [ ["", "Kia", "Nissan",

Handsontable RuleJS missing recursive resolution

和自甴很熟 提交于 2019-12-13 02:16:25
问题 I use RuleJS plugin for Handsontable (see it on GitHub) which works great for basic formulas but seems to lack recursive resolution. I've made a code snippet containing two detailed examples, please check it out : $(document).ready(function () { var container1 = $('#example1'); var container2 = $('#example2'); container1.handsontable({ data: [[1, '=A2'], ['=B2', '=5 * 2']], colHeaders: true, rowHeaders: true, formulas: true, minSpareRows: 1 }); container2.handsontable({ data: [[1, '=A2', 3],

Handsontable is not fully rendered when using Chrome's built in search function

喜你入骨 提交于 2019-12-13 01:35:16
问题 Weird, inconsistent problem I am running into when using Chrome's built in search function. I have some 250 lines of data to be rendered in a handsontable, more than can be displayed on your screen without scrolling or zooming out. http://jsfiddle.net/hU6Kz/3723/ var myData = [ ["", "Kia", "Nissan", "Toyota", "Honda"], ["lots of data begins here"], ]; $("#exampleGrid").handsontable({ data: myData, startRows: 5, startCols: 5, minSpareCols: 1, minSpareRows: 1, rowHeaders: true, colHeaders: true

Handsontable : how to change cell value in render function

余生颓废 提交于 2019-12-12 17:01:22
问题 I have similar code: <script> $(document).ready(function () { var data = @Html.Raw(ViewBag.Data); function sumPreviousValues(instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.TextRenderer.apply(this, arguments); td.val = 'SUM SEVERAL PREVIOUS CELLS'; } container = document.getElementById('example1'), settings1 = { data: data, colHeaders: @Html.Raw(ViewBag.TableHeader), cells: function (row, col, prop) { var cellProperties = {}; if (col == 16) { cellProperties

handsontable: how to use an entire datarow (object) as data for a hot-column?

元气小坏坏 提交于 2019-12-12 10:18:49
问题 Using the Angular directive of handsontable 0.26.x in my project first time, I have the following table: The table is showing some items, which are in scope as $scope.plants , and has three fix columns. The third column is a bit special though, because I have a special renderer there, to which I want to pass the the entire data row object (plant). <hot-table datarows="plants" settings="hotTableSettings"> <hot-column data="name" title="Name"></hot-column> <hot-column data="power" title="Power"

Handsontable Select2 Dependent Dropdowns

浪子不回头ぞ 提交于 2019-12-12 05:48:57
问题 I have two select2 dropdowns and I want to change options the second dropdown depending on first dropdown. For example, { data: 'country_id', editor: 'select2', renderer: customDropdownRenderer, select2Options: { data: {!! $production_units !!} , dropdownAutoWidth: true, } }, { data: 'state_id', editor: 'select2', renderer: customDropdownRenderer, select2Options: { data: [], dropdownAutoWidth: true, width: 'resolve' } }, Depending on country_id, I want to change select2 options of state_id. I

Unable to compile angular component in handsontable cell

强颜欢笑 提交于 2019-12-11 16:58:36
问题 Really stuck in a problem, I’m using handsontable with angular2. And in handsontable I’m using cell renderes to populate cells and that cell contains an angular component. But the problem is that cell is not compiling in angular scope 回答1: You will need to compile the component you want to display in the cell and add the component's html to the cell in a custom renderer. Here's an example: import { Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, OnInit, OnDestroy,

Tabbing outside of handsontable cells

安稳与你 提交于 2019-12-11 10:55:57
问题 We have a button at the bottom of handsontable. When the user tabs in the last cell, can we select the button instead of wrapping back to the first cell? Here is the jsFiddle var data = [ ["", "Ford", "Volvo", "Toyota", "Honda"], ["2014", 10, 11, 12, 13], ["2015", 20, 11, 14, 13], ["2016", 30, 15, 12, 13] ]; var container = document.getElementById('example'); var hot = new Handsontable(container, { data: data, minSpareRows: 1, rowHeaders: true, colHeaders: true, autoWrapRow: true,

Multiple editors in handsontable

夙愿已清 提交于 2019-12-11 10:08:41
问题 I'm wondering how its possible to use multiple editors in handsontable.js library. I'm using the columns option to specify each column attributes. Some of them show a list with the possible options for the cell: { data: 3, type: 'autocomplete', source: function (query, process) { response = JSON.parse($('#options').val()); process(response); }, strict: false, allowInvalid: true, }, In this case, it will generate the list of options in the source option. Now, I would like to add another editor