Select filter is showing all values as undefined
See original GitHub issueMy html
<table ng-show="!loading" show-filter="true" class="ebTable eftf ebTable_striped" ng-table="tableParams" template-pagination="custom-pager"> <tr ng-repeat="probe in $data"> <td data-title="'Host'" sortable="'host'" filter="{host: 'select'}" filter-data="fetchHosts($column)">{{probe.host}}</td>
My controller
$scope.fetchHosts = function ($column) { if($column.title() === "Host") { return [{host: "192.168.1.34"}, {host: "192.168.1.36"}]; } };
The documentation for the select filter only says that the fetchData function must return an array or a promise that returns an array etc. Despite that it fails, something is missing from the documentation i think.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
How to filter undefined values from Array JavaScript?
i want to filter undefined values and duplicate values from array and output in options values as selected. I would be grateful for...
Read more >Filtering away an undefined value from a list in Ansible - Medium
I combined two Ansible (actually, jinja2) filters: select and defined . defined filter checks is value is defined or not. It returns True...
Read more >Array.prototype.find() - JavaScript - MDN Web Docs - Mozilla
The find() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the ...
Read more >Remove undefined values from an array in JavaScript
An array in JavaScript permits undefined values, null values, or any type of falsy values. There are several methods to filter these values...
Read more >Using filters to manipulate data - Ansible Documentation
Filters can help you manage missing or undefined variables by providing defaults ... You can combine data from multiple sources and types, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, i have got it working. The values are being shown in the dropdown now(not undefined anymore). The doc did not specify that the id and title attribute are necessary. I wish the document was more explicit. Please correct me if i am wrong in using id and title.
Thank you. The reason why I barely use ngTable, it’s because of documentation.