Remove the bottom margin of a handsontable

前端 未结 1 1221
执念已碎
执念已碎 2021-01-29 09:57

I am using Chrome Version 61.0.3163.100 (Official Build) (64-bit) or Safari Version 11.0 (12604.1.38.1.7) under Mac OS Sierra 10.12.6.

I want to create a handsontable, w

1条回答
  •  萌比男神i
    2021-01-29 10:37

    What I saw in that demo of yours is; the default browser style (margin) added to the body, and not the table.

    Setting the margin CSS property for the body can be helpful. Check it out yourself below in the snippet, or here: https://jsbin.com/qejekiqigo/1/edit?html,output

    var app = angular.module('app', ['ngHandsontable']);
    app.controller('Ctrl', ['$scope', '$filter', '$timeout', 'hotRegisterer', function($scope, $filter, $timeout, hotRegisterer) {
      $scope.dataJson = [
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7],
        [5],
        [7]
      ];
    
      $scope.settings = {
        contextMenu: true,
        onAfterCreateRow: function(index, amount) {
          console.log("onAfterCreateRow");
    
          $timeout(function() {
            $scope.$digest();
          });
    
        }
      };
    }]);
    
    
    
    
      
      
      
      
      
    
    
    
      

    0 讨论(0)
提交回复
热议问题