When I do a search in ModelAdmin, the results are limited to 30 by default which is ok. The problem is that I cannot see all of the results because of a bug in the CSS. The outer div does not surround all of the results but seems to cover up the lower ones. I am using SS 2.3.3.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Have you tried different browsers? How about tweaking it with Firebug and/or greasemonkey until the fix is applied? You did log/search the open tickets on this, correct?
I ran into the same issue. Apparently this is being changed in 2.4, so you can regard this as a temp patch.
There is a fitToParent javascript call that helps keep everything looking nice but applying overflow:hidden to holder objects. It doesn't apply this if overflow:auto is specifically set, though.... In the case of ModelAdminPanel, this is not set which is keeping the scrollbar from appearing. This fix worked for me and my clients:
First, apply the following code to your init() function in your ModelAdmin class:
function init() {
parent::init();
Requirements::customCSS("
#right #ModelAdminPanel{overflow:auto !important;}
body.ModelAdmin #right{overflow: auto !important;}
");
Next, you'll need to mod the LeftAndMain.js file. At line 160, comment out the fitToParent function:
// fitToParent('ModelAdminPanel',-60);
Let us know how it works out for you!
-John
Thanks SmartPlugs. Good fix.
An easier fix is to just add the following to one of your custom css files or as above:
ProductAdmin.js
$('#ModelAdminPanel').css('overflow', 'auto');
Personally if I am hacking I like to still leave the core files alone.
Hi guys,
Place this in your extended ModelAdmin class...
static $page_length = 10;
...it will limit the results :)