Skip to content

Commit

Permalink
bug fix no-types#53
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen N committed Nov 3, 2019
1 parent 220d308 commit 677b31a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion inst/htmlwidgets/lib/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
.command-container {
display: flex;
justify-content: flex-end;
align-items: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
Expand Down Expand Up @@ -198,7 +199,7 @@
min-width: 24px;
}
.command-container > div {
padding-left: 10px;
padding: 0px 10px;
}
.remove-icon {
padding-top: 6px;
Expand Down
14 changes: 8 additions & 6 deletions javascript/AgGridUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,29 @@ export class AgGridUtil{
static getColDef({data,isNumeric,sparkLineOptions,licenseKey,colOpts,formattingOptions,rowHeaders}){
const columnHeaders = Object.keys(data);

let colDef = columnHeaders.map((columnHeader) => {
const colDef = columnHeaders.map((columnHeader) => {
const isColNumeric = isNumeric[columnHeader];
let options = {
const options = {
headerName: columnHeader,
field: AgGridUtil.escape(columnHeader),
enableValue: isColNumeric,
filter : isColNumeric ? "agNumberColumnFilter" : "agTextColumnFilter"
};
let sparkLineColDefOptions = SparkLineUtils.getSparkLineColDefOptions(sparkLineOptions,columnHeader);
let numericOptions = AgGridUtil.getNumericOptions(isColNumeric,formattingOptions[columnHeader]);
let userOptions = colOpts[columnHeader] || {};
let enterpriseColDefOptions = AgGridUtil.getEnterpriseColDefOptions(isColNumeric,licenseKey);
const sparkLineColDefOptions = SparkLineUtils.getSparkLineColDefOptions(sparkLineOptions,columnHeader);
const numericOptions = AgGridUtil.getNumericOptions(isColNumeric,formattingOptions[columnHeader]);
const userOptions = colOpts[columnHeader] || {};
const enterpriseColDefOptions = AgGridUtil.getEnterpriseColDefOptions(isColNumeric,licenseKey);
return Object.assign(options, enterpriseColDefOptions,sparkLineColDefOptions,numericOptions,userOptions);
});

if(rowHeaders){
const userOptions = colOpts["rowHeader"];
colDef.unshift({
field : "rowHeaders",
headerName : "",
enablePivot : licenseKey ? false : undefined,
enableRowGroup : licenseKey ? false : undefined,
...userOptions
});
}

Expand Down

0 comments on commit 677b31a

Please sign in to comment.