From c4d9ab2c488cebe7e4b772427b79c9894618c408 Mon Sep 17 00:00:00 2001 From: gitsno <11527628+gitsno@users.noreply.github.com> Date: Mon, 11 Feb 2019 12:37:59 -0600 Subject: [PATCH] Fixes issue with using multiple params and columns - modified the params loop to exit once a param has been replaced. --- package.json | 2 +- src/CellHtml/widget/CellHtml.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d6f66e3..150f132 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "eslint-config-recommended": "^1.5.0", "eslint-config-standard": "^10.2.1", "eslint-loader": "^1.9.0", - "eslint-plugin-import": "^2.7.0", + "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^5.2.0", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-standard": "^3.0.1", diff --git a/src/CellHtml/widget/CellHtml.js b/src/CellHtml/widget/CellHtml.js index 32dcb1c..9251cbc 100644 --- a/src/CellHtml/widget/CellHtml.js +++ b/src/CellHtml/widget/CellHtml.js @@ -68,7 +68,10 @@ export default defineWidget('CellHtml', false, { if (html) { for (param of this.params) { - htmlStr = html.split("${" + param.name + "}").join(rowObj.get(param.valueAttr)); + if (-1 !== html.indexOf("${" + param.name + "}")) { + htmlStr = html.split("${" + param.name + "}").join(rowObj.get(param.valueAttr)); + break; + } } const nodeToRemove = query("." + column.columnName + "-html", nodeToApply)[ 0 ]; if (nodeToRemove) {