Open shure77 opened 5 years ago
I also have this problem - relations only work for simple values, not if one of the values in a multiple-select matches. And unfortunately it doesn't really help to try to write my own matcher, because all I get is "isMatch" true or false - I can't modify the logic for the test itself.
@shure77 @mischkl
I'll have a look at this
@shure77 @mischkl
I'll have a look at this
Hello, did you figure out how to solve this?
@AndreaRossiGit Hey, I am not sure but I think putting the controls in a group did the trick:
group: [ { id: 'fuehrerscheinKlassen', type: TYPE_CHIP_CHOICE, placeholder: 'Führerscheinklassen', required: true, errorMessages: { required: '{{ placeholder }} ist ein Pflichtfeld.', }, options: [ { label: 'AM', value: 'AM', }, { label: 'A1', value: 'A1', }, { label: 'A2', value: 'A2', }, { label: 'A', value: 'A', }, { label: 'B1', value: 'B1', }, { label: 'B', value: 'B', }, { label: 'C1', value: 'C1', }, { label: 'C', value: 'C', }, { label: 'D1', value: 'D1', }, { label: 'D', value: 'D', }, { label: 'BE', value: 'BE', }, { label: 'C1E', value: 'C1E', }, { label: 'CE', value: 'CE', }, { label: 'D1E', value: 'D1E', }, { label: 'DE', value: 'DE', }, { label: 'F', value: 'F', }, ], }, { id: 'fuehrerscheinRueckseite', type: TYPE_CUSTOM_FILE_UPLOAD, labelTooltip: 'Führerscheinrückseite für Klasse "AM" hinzufügen', relations: [ { match: MATCH_SELECT_VISIBLE, when: [ { id: 'fuehrerscheinKlassen', value: ['AM'], }, ], }, ]
hello, did anyone find a solution for this? @shure77's solution didn't work for me
I'm submitting a
I'm using
Description
Relation is not working if I want to make my INPUT dependent to a SELECT with multiple = true:
Example:
{ "id": "lenker_fuehrerscheinKlassen", "type": "SELECT", "placeholder": "Führerscheinklassen", "multiple": true, "required": true, "validators": { "required": null }, "errorMessages": { "required": "{{ placeholder }} ist ein Pflichtfeld." }, "options": [ { "label": "AM", "value": "am" }, { "label": "A1", "value": "a1" }, { "label": "A2", "value": "a2" } ] }, { "id": "lenker_fuehrerscheinComment", "type": "INPUT", "label": "Kommentar", "relations": [ { "match": "VISIBLE", "when": [ { "id": "lenker_fuehrerscheinKlassen", "value": "am" } ] } ] }