Rename the "display" filter parameter to "show" for consistency.

This commit is contained in:
Alex Tselegidis 2022-01-07 09:07:07 +01:00
parent bd3b55c2f9
commit e0c66cd066
1 changed files with 4 additions and 4 deletions

View File

@ -338,9 +338,9 @@ App.Pages.Customers = (function () {
* @param {String} keyword This keyword string is used to filter the customer records. * @param {String} keyword This keyword string is used to filter the customer records.
* @param {Number} selectId Optional, if set then after the filter operation the record with the given * @param {Number} selectId Optional, if set then after the filter operation the record with the given
* ID will be selected (but not displayed). * ID will be selected (but not displayed).
* @param {Boolean} display Optional (false), if true then the selected record will be displayed on the form. * @param {Boolean} show Optional (false), if true then the selected record will be displayed on the form.
*/ */
function filter(keyword, selectId = null, display = false) { function filter(keyword, selectId = null, show = false) {
App.Http.Customers.search(keyword, filterLimit).then((response) => { App.Http.Customers.search(keyword, filterLimit).then((response) => {
filterResults = response; filterResults = response;
@ -365,13 +365,13 @@ App.Pages.Customers = (function () {
'text': App.Lang.load_more, 'text': App.Lang.load_more,
'click': function () { 'click': function () {
filterLimit += 20; filterLimit += 20;
filter(keyword, selectId, display); filter(keyword, selectId, show);
}.bind(this) }.bind(this)
}).appendTo('#filter-customers .results'); }).appendTo('#filter-customers .results');
} }
if (selectId) { if (selectId) {
select(selectId, display); select(selectId, show);
} }
}); });
} }