clean up columnDefs render
Leonardo Merza ljmerza@gmail.com
Thu, 30 Jan 2020 13:38:58 -0500
1 files changed,
8 insertions(+),
3 deletions(-)
jump to
M
assets/js/app.js
→
assets/js/app.js
@@ -112,10 +112,15 @@ }
}; const styles = styleMap[data] || {}; - const labelType = styles.labelType || 'default'; - const style = styles.style || ''; + + if (styles){ + const labelType = styles.labelType || 'default'; + const style = styles.style || ''; + + return `<span class="label label-${labelType}" style="background-color: rgba(26, 26, 26, 1); ${style}"> ${data} </span>`; + } - return `<span class="label label-${labelType}" style="background-color: rgba(26, 26, 26, 1); ${style}"> ${data} </span>`; + return data; } } ],