* Views listing behaviors.
*/
-(function ($, Drupal) {
+(function($, Drupal) {
/**
* Filters the view listing tables by a text input search string.
*
let $rows;
function filterViewList(e) {
- const query = $(e.target).val().toLowerCase();
+ const query = $(e.target)
+ .val()
+ .toLowerCase();
function showViewRow(index, row) {
const $row = $(row);
- const $sources = $row.find('[data-drupal-selector="views-table-filter-text-source"]');
- const textMatch = $sources.text().toLowerCase().indexOf(query) !== -1;
+ const $sources = $row.find(
+ '[data-drupal-selector="views-table-filter-text-source"]',
+ );
+ const textMatch =
+ $sources
+ .text()
+ .toLowerCase()
+ .indexOf(query) !== -1;
$row.closest('tr').toggle(textMatch);
}
// Filter if the length of the query is at least 2 characters.
if (query.length >= 2) {
$rows.each(showViewRow);
- }
- else {
+ } else {
$rows.show();
}
}
}
},
};
-}(jQuery, Drupal));
+})(jQuery, Drupal);