-
Notifications
You must be signed in to change notification settings - Fork 0
Tabs
Erin Heinz edited this page Mar 16, 2020
·
1 revision
Tabs are a display option available to sections. They can also be displayed using the allOf
schema property, which will be described here.
The user is able to display sections as tabs by utilizing the allOf
property available in JSON schemas. Currently, the JSF library only supports an allOf
array containing objects.
*= required property
Property | Value | Use | Example |
---|---|---|---|
type | -- | Type is not used here. Instead this control looks for the allOf key and an array of objects. | -- |
display |
"sections" OR "tabs"
|
The display. Default is as sections, but display: sections can be explicitly defined. tabs is available as a value to instead display sections as tabs in a tabstrip, which will always appear at the bottom of its section. Alone, a display of tabs will result in all sections being placed as tabs in a tabstrip. |
"display": "tabs" |
tabs | String[] |
This array enables the user to specify which sections to display as tabs. It contains the key values of those objects that should display as tabs. If a display of tabs is not present, it will be ignored. |
"tabs": ["objectOneKey", "objectTwoKey"] |
*name | String |
The corresponding label for the form element. | "name": "Form Display Name" |
helpText | String |
Will display as an information icon next to the form element. The provided string will display when the user hovers over the icon. | "helpText": "This is help text that can be very long." |
tooltip | String |
The tooltip that will display when hovering over the form element. | "tooltip": "Too tip for the form element." |
*allOf |
Object[] See Sections
|
The keys of these objects are what will be listed in the tabs array, if present. Any objects not displayed as tabs, either implicitly or explicitly, will display as sections. Note: since this is an array of objects, the object’s key must be explicitly added.
|
See example below. |
required | String[] |
This property is added to the object to indicate which children are required. Used in the child objects of the oneOf array. It is an array of keys associated with a child control. These keys can only be keys that exist in this section’s properties object . This array cannot reference nested keys. |
"required": ["key1", "key2"] |
default |
String This is the key of the selected option
|
The key of the default object that should be in the input. | "default": "option1" |
isReadOnly | boolean |
This property indicates that the input control cannot be changed by the user. Any data within a readonly field will not be returned upon form submission. | "isReadOnly": true |
isHidden | boolean |
This flag will hide the element and all of its children from view of the user. However, this can still be programmatically set. | "isHidden": true |
Example
"employeeIDFieldInBamboo": {
"name": "Store TriNet Employee ID in BambooHR as:",
"display": "tabs",
"tabs": ["triNetEmployeeId"],
"default": "employeeNumber",
"allOf": [
{
"type": "object",
"name": "Employee Number",
"key": "employeeNumber",
"properties": {
}
},
{
"type": "object",
"name": "TriNet Employee ID",
"key": "triNetEmployeeId",
"required": [
"employeeId"
],
"properties": {
"employeeId": {
"type": "string",
"name": "Employee ID"
}
}
}
]
}
Example Return Value
"employeeIDFieldInBamboo": {
"triNetEmployeeId": {
"employeeId": "employeeId123"
}
}
-
Enhancement: Added the ability to display tabs via
allOf
.