Search results in a Smart Table
When using Smart Tables with search function, the following considerations may be applied:
Clear Sorting and Filters on new search results:
** example: Smart Table has a Grid Table with id tblARCustomer
var oTable = getControl("tblARCustomer"); oTable.getBinding().sort(null); oTable.getBinding().filter(null); var aColumns = oTable.getColumns(); for (var i = 0; i < aColumns.length; i++) { aColumns[i].setSorted(false); var bFiltered = aColumns[i].getFiltered(); if (bFiltered) { // clear column filter if the filter is set aColumns[i].filter(""); } }Clear the added fields on personalization and on the variant changes on new search:
** example: Smart Table with id smTblARCustomer
// clear personalization and variant changes
getControl("smTblARCustomer")._oPersController.resetPersonalization(); getControl("smTblARCustomer")._oVariantManagement.currentVariantSetModified(false);