Last active
January 17, 2019 20:28
-
-
Save Avotrix/d4c9ed93714d90afba0b0a278d6a98ea to your computer and use it in GitHub Desktop.
cell renderer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: function($td, cell) { var message = cell.value; | |
var tip = cell.value; | |
if(message.length > 48) { message = message.substring(0,47) + "..." } | |
$td.html(_.template('<a href="#" data-toggle="tooltip" data-placement="left" title="<%- tip%>"><%- message%></a>', | |
{ | |
tip: tip, | |
message: message | |
})); | |
// This line wires up the Bootstrap tooltip to the cell markup | |
$td.children('[data-toggle="tooltip"]').tooltip(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment