Skip to content

Commit

Permalink
Add support for Handsontable v8
Browse files Browse the repository at this point in the history
  • Loading branch information
budnix committed Aug 28, 2020
1 parent 65059ca commit 50dedff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/services/settingFactory.js
Expand Up @@ -214,7 +214,14 @@
* @returns {Array}
*/
getAvailableSettings: function(hyphenateStyle) {
var settings = Object.keys(Handsontable.DefaultSettings.prototype);
var defaultSettings = Handsontable.DefaultSettings.prototype;

// For Handsontable v8 the prototype is `undefined`.
if (defaultSettings === void 0) {
defaultSettings = Handsontable.DefaultSettings;
}

var settings = Object.keys(defaultSettings);

if (settings.indexOf('contextMenuCopyPaste') === -1) {
settings.push('contextMenuCopyPaste');
Expand Down

0 comments on commit 50dedff

Please sign in to comment.