Scripting Widgets
Script Select tsm-script-lov
Selection of a script from a dropdown list.
Widget Or Layout: unknown
Value:
{
"type": "string",
"title": "Select a Script",
"widget": {
"type": "tsm-script-lov"
}
}
Inputs
Default value
Key: default
Name: Default value
Default: ""
Type
Key: scriptTypes
Name: Type
Default: []
Filters
Key: defaultFilters
Name: Filters
Default: null
Keyboard on mobile
Key: keyboardOnMobile
Name: Keyboard on mobile
Description: When enabled, a system keyboard is shown on mobile devices to filter the list during selection.
Default: true
Show clear
Key: showClear
Name: Show clear
Description: When enabled, a clear icon is shown next to the selector so the user can clear the selected value.
Default: true
Show none text
Key: showNoneText
Name: Show none text
Description: When enabled, a "No value" item appears in the dropdown and can be selected to clear the field.
Default: true
Select first value
Key: selectFirstValue
Name: Select first value
Description: When only one record is available, it will be auto-selected. When multiple records exist, nothing happens.
Default: false
Selection using a listing (one or more values)
Key: multiselect
Name: Selection using a listing (one or more values)
Default: false
Value
Key: selectProperty
Name: Value
Default: "id"
Display
Key: displayField
Name: Display
Description: It is possible to add multiple values using autocomplete or with source code ["key", "name"]
Default: ["name"]
Examples
Curated configurations from libs/framework/fluent-forms/__fixtures__/widgets/tsm-script-lov/.
Each is a complete validated FluentSchema — copy & adapt for your form.
Gen default filters — gen-default-filters.json
Demonstrates widget.defaultFilters = "exampleValue" on tsm-script-lov.
{
"type": "object",
"title": "Script Select — Filters",
"description": "Demonstrates widget.defaultFilters = \"exampleValue\" on tsm-script-lov.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"defaultFilters": "exampleValue"
}
}
},
"layout": [
"field"
]
}
Gen keyboard on mobile — gen-keyboard-on-mobile.json
Keyboard on mobile: When enabled, a system keyboard is shown on mobile devices to filter the list during selection.
{
"type": "object",
"title": "Script Select — Keyboard on mobile",
"description": "Keyboard on mobile: When enabled, a system keyboard is shown on mobile devices to filter the list during selection.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"keyboardOnMobile": false
}
}
},
"layout": [
"field"
]
}
Gen script types — gen-script-types.json
Demonstrates widget.scriptTypes = ["exampleItem"] on tsm-script-lov.
{
"type": "object",
"title": "Script Select — Type",
"description": "Demonstrates widget.scriptTypes = [\"exampleItem\"] on tsm-script-lov.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"scriptTypes": [
"exampleItem"
]
}
}
},
"layout": [
"field"
]
}
Gen select first value — gen-select-first-value.json
Select first value: When only one record is available, it will be auto-selected. When multiple records exist, nothing happens.
{
"type": "object",
"title": "Script Select — Select first value",
"description": "Select first value: When only one record is available, it will be auto-selected. When multiple records exist, nothing happens.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"selectFirstValue": true
}
}
},
"layout": [
"field"
]
}
Gen show clear — gen-show-clear.json
Show clear: When enabled, a clear icon is shown next to the selector so the user can clear the selected value.
{
"type": "object",
"title": "Script Select — Show clear",
"description": "Show clear: When enabled, a clear icon is shown next to the selector so the user can clear the selected value.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"showClear": false
}
}
},
"layout": [
"field"
]
}
Gen show none text — gen-show-none-text.json
Show none text: When enabled, a "No value" item appears in the dropdown and can be selected to clear the field.
{
"type": "object",
"title": "Script Select — Show none text",
"description": "Show none text: When enabled, a \"No value\" item appears in the dropdown and can be selected to clear the field.",
"properties": {
"field": {
"type": "string",
"title": "Field",
"widget": {
"type": "tsm-script-lov",
"showNoneText": false
}
}
},
"layout": [
"field"
]
}