smartBox.historyItemTemplateFunction
Represents the template for a history query in the SmartBox component.
Example - set a custom history item template
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "ProductName" },
{ field: "UnitPrice" }
],
dataSource: {
data: [
{ ProductName: "Tea", UnitPrice: 10 },
{ ProductName: "Coffee", UnitPrice: 15 }
]
},
search: {
fields: [{ name: "ProductName", operator: "contains" }]
},
toolbar: ["smartBox"],
smartBox: {
history: true,
historyItemTemplate: (dataItem) => `<div class="history-item"><span class="query">${dataItem.query}</span><span class="time">${kendo.toString(dataItem.timestamp, dataItem.timestampFormat)}</span></div>`
}
});
</script>