Skip to content

Commit

Permalink
Merge pull request #546 from jpmorganchase/hypergrid-hover-theme-fix
Browse files Browse the repository at this point in the history
Hypergrid hover theme fix
  • Loading branch information
texodus authored Apr 19, 2019
2 parents e26c7e6 + 64fe927 commit 529e9b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/perspective-viewer-hypergrid/src/js/hypergrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const perspectivePlugin = require("./perspective-plugin");
const PerspectiveDataModel = require("./PerspectiveDataModel");
const treeLineRendererPaint = require("./hypergrid-tree-cell-renderer").treeLineRendererPaint;
const {psp2hypergrid, page2hypergrid} = require("./psp-to-hypergrid");
const {cloneDeep} = require("lodash");

import {bindTemplate} from "@jpmorganchase/perspective-viewer/cjs/js/utils.js";

Expand Down Expand Up @@ -117,7 +118,7 @@ const light_theme_overrides = {
};

function generateGridProperties(overrides) {
return Object.assign({}, base_grid_properties, overrides);
return Object.assign({}, cloneDeep(base_grid_properties), cloneDeep(overrides));
}

function null_formatter(formatter, null_value = "") {
Expand Down Expand Up @@ -193,7 +194,7 @@ bindTemplate(TEMPLATE, style)(
return _old_paint.call(this, gc, config);
};

const grid_properties = generateGridProperties(Hypergrid._default_properties || light_theme_overrides);
const grid_properties = generateGridProperties(light_theme_overrides);

grid_properties["showRowNumbers"] = grid_properties["showCheckboxes"] || grid_properties["showRowNumbers"];
grid_properties["treeHeaderBackgroundColor"] = grid_properties["backgroundColor"] = this.get_style("--hypergrid-tree-header--background");
Expand Down

0 comments on commit 529e9b5

Please sign in to comment.