By default for .ui-accordion-content-active element overflow: visible.
If user somehow added inline style height to .ui-accordion-content element, this will have priority and use overflow: auto value that is set for .ui-accordion-content, because new changes won't be applied.
Test steps:
Add the following code in to the Page class.
use SilverStripe\LinkField\Form\LinkField;
use SilverStripe\LinkField\Form\MultiLinkField;
use SilverStripe\LinkField\Models\Link;
...
private static $has_one = [
'ExampleLink' => Link::class,
'ExampleLink1' => Link::class,
'ExampleLink2' => Link::class,
];
private static array $has_many = [
'ExampleLink3' => Link::class . '.Owner',
];
public function getCMSFields()
{
$fields = parent::getCMSFields();
$linksHolder = ToggleCompositeField::create( 'Links one', 'Add Custom Links'),
[
LinkField::create('ExampleLink1', 'Link to page or file'),
LinkField::create('ExampleLink2', 'Link to page or file'),
MultiLinkField::create('ExampleLink3', 'Link to page or file'),
]
);
$linksHolder->setStartClosed(false);
$fields->insertAfter('Content', $linksHolder);
$linkHolder = ToggleCompositeField::create( 'Link two', 'Add a Custom Link'),
[
LinkField::create('ExampleLink', 'Link to page or file'),
]
);
// Test DropdownField
// $linkHolder = ToggleCompositeField::create(
// 'Links',
// _t(__CLASS__ . '.CUSTOMSUMMARY', 'Add A Custom Links'),
// [
// DropdownField::create(
// 'List DataObjects',
// false,
// [
// "do1" => "DataObject_1",
// "do2" => "DataObject_2",
// "do3" => "DataObject_3",
// "do4" => "DataObject_4",
// "do5" => "DataObject_5",
// "do6" => "DataObject_6",
// ]
// ),
// ]
// );
$linkHolder->setStartClosed(true);
return $fields;
}
Description
Implemented solution kinglozzer : https://github.com/silverstripe/silverstripe-admin/issues/779#issuecomment-1122220402
By default for
.ui-accordion-content-active
elementoverflow: visible
.If user somehow added inline style
height
to.ui-accordion-content
element, this will have priority and useoverflow: auto
value that is set for.ui-accordion-content
, because new changes won't be applied.Test steps:
Add the following code in to the Page class.