Setting of custom filter for customer and order grid in Admin
-
09-10-2020 - |
Solution
The thing you want to achieve here I personally don't think its a good Idea. The process may take a longer time to load or may even stuck depending on server specs.
Although If you still want to do this. Magento sets a min and max value where you can set in for custom listing.
/**
* Converts provided value to a number and puts
* it in range between 'minSize' and 'maxSize' properties.
*
* @param {(Number|String)} value - Value to be normalized.
* @returns {Number}
*/
normalize: function (value) {
value = +value;
if (isNaN(value)) {
return this.getFirst();
}
return utils.inRange(Math.round(value), this.minSize, this.maxSize);
}
So the above function will check the range and if it exceeds the range it will return the maxSize
So you need to change the maxSize in order to get the range you want.
return Element.extend({
defaults: {
template: 'ui/grid/paging/sizes',
value: 20,
minSize: 1,
maxSize: 999, // You need to change this value
options: {
'20': {
value: 20,
label: 20
},
'50': {
value: 50,
label: 50
},
'100': {
value: 100,
label: 100
},
'200': {
value: 200,
label: 200
}
},
statefull: {
options: true,
value: true
},
listens: {
value: 'onValueChange',
options: 'onSizesChange'
}
},
Recommend not to change the core file you can override it. Make sure to deploy static content after you make changes.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange