Hello. I’m trying to modify the java script from the “simple column spanning” example found here but instead of an exact match I want to look for characters contained in the string of that column. Below is the code I modified from the original example to try and make it work however the app never finishes updating. I also tried using .substring() instead of .includes() but that didn’t work either. Any thoughts or suggestions? When using the original example and keying in the entire string I am looking for it does in fact work so I do know that it is finding the js. Is there possibly a wildcard key that I could use in the lookup value instead of a built in function? Thanks in advance.
example of the full values that I am trying the partial lookup on are: “06/07 - 06/21” and “Week of 06/03”
Also is there a way to change the background color on only the spanned columns? In the example the color is applied to the entire column.
var dagfuncs = window.dashAgGridFunctions = window.dashAgGridFunctions || {};
dagfuncs.colSpanningSimple = function (params) {
const responsible = params.data.Responsible;
if (responsible.includes(' - ')) {
return 4;
} else if (responsible.includes('Week')) {
return 4;
} else {
return 1;
}
}