mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
NEW Add hideNav flag to schema defaults
This commit is contained in:
parent
a33866ff4c
commit
588bf83e12
@ -243,4 +243,19 @@ class TabSet extends CompositeField
|
||||
}
|
||||
return parent::insertAfter($insertAfter, $field);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an additional default for $schemaData.
|
||||
* The existing keys are immutable. HideNav is added in this overriding method to ensure it is not ignored by
|
||||
* {@link setSchemaData()}
|
||||
* It allows hiding of the navigation in the Tabs.js React component.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSchemaStateDefaults()
|
||||
{
|
||||
$defaults = parent::getSchemaStateDefaults();
|
||||
$defaults['hideNav'] = false;
|
||||
return $defaults;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user