Closed Jenselme closed 8 years ago
Hello,
Thanks for your report. We use JQuery to merge the default config with the custom config. In case of array property, the default property isn't fully replace but just the elements on the same position are replaced.
Today, i don't found any solution but i tries to find it !
I see where the problem is. Maybe override this by hand with:
var settings = $.extend(true, {}, this.configDefault, config);
if ($.isArray(config.pagination.numberRecordsPerPageList)) {
settings.pagination.numberRecordsPerPageList = config.pagination.numberRecordsPerPageList;
}
this.config = angular.copy(settings);
What do you think?
Your solution works but I am not sure that's the best solution. Before implement your solution, I try to search another way to resolve this problem.
Thanks for your feeback.
I resolve the problem. Can you try please ?
It works, thanks!
If I set
numberRecordsPerPageList
to a list of two elements, for instance:I get the following proposal for size:
But if I set my
numberRecordsPerPageList
to an array of 4 or more element, the choice is correctly respected.