Posted 16 February 2021, 11:47 pm EST
Hello again,
i am still working on a custom dialog for the SpreadJS designer component.
I want to disable and enable components in the dialog depending on which radio option is checked.
Example:
Radio Option 1: Enable the RangeSelect component and disable all TextEditors
Radio Option 2: Enable all TextEditors (for input of source column, start row and ending row) and disable the RangeSelect component
I saw that the ComponentBaseOption has a parameter enableWhen, but it wants a string?
How does that parameter work? I cant find anything about it.
Or do i have to do a work arround somewhere else?
Thats my template:
var testTemplate = {
title: dict.templ_T_Ti,
content: [
{
type: "ColumnSet",
children: [
{
type: "Column",
children: [
{
//Typical RangeSelect
type: "RangeSelect",
titel: "Select Range",
bindingPath: "targetRange"
}, {
type: "TextEditor",
bindingPath: "firstColumn"
}, {
type: "TextEditor",
bindingPath: "firstRow"
}, {
type: "TextEditor",
bindingPath: "lastColumn"
}, {
type: "TextEditor",
bindingPath: "lastRow"
}, {
type: "Radio",
columnCount: 1,
items: [
{
text: "Rangeselect:",
value: "rangeSelectOption"
},
{
text: "Quellspalte:",
value: "textEditorOption"
}
],
bindingPath: "radio"
},]
}]
}]
}
Regards
Maik