Data table filter not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 10:16 PM - edited 03-01-2024 01:10 AM
Hello,
I'm currently working on implementing a new list using the data table widget, and I've encountered some issues with enabling filters.
Upon the page load, I'm displaying data using server-side code as shown below:
var widgetParams = data.myTicketsArray[0];
widgetParams.window_size = options.maximum_entries || 10;
widgetParams.show_keywords = true;
widgetParams.show_breadcrumbs = true;
console.log($sp.getWidget('widget-data-table', widgetParams));
data.widget = $sp.getWidget('widget-data-table', widgetParams);
However, when I trigger the tableSwitch function to update the table with different filters and parameters, the filter and keyword search options seem to be missing. Here's the code for the tableSwitch function:
$scope.tableSwitch = function() {
var params = $scope.selected;
params.show_breadcrumbs= true;
params.enable_filter = true
spUtil.get('widget-data-table', params).then(function(response) {
$scope.data.widget = response;
});
};
Despite setting the enable_filter and show_keywords parameters within the tableSwitch function, these options don't seem to be reflected in the updated table.
Any insights or suggestions would be greatly appreciated. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:49 PM
1. Where are you adding the new filter & new table name ?
2. If you are setting with option schema, update the option schema which switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 12:04 AM
Hello,
$scope.selected object has all options like table, filter, fields etc.