Replies: 1 comment
-
I'm having trouble understanding your issue, can you post a minimally reproducible example of the problem you're facing (e.g. in a JSFiddle or similar) so we can help you out? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello i don't found solution to my problem, i have 2 case on a datagrid
**first case : **
my checkbox "key": "multiValued" (look jsonForm) is disabled: true by default for existing data but when i click on +add button it is disbled true too by default and in my case i want this are disabled: false to be able to select for all new row added.
**Second case: **
my checkbox "key": "required" (look jsonForm) are disabled : false by default but i want Only for existing data
if value of row.required is true checkbox need to be disabled : false
if value of row.required is false checkbox need to be disabled : true and for new Row added by +add button "key": "required" checkbox need to be disabled : false
my jsonForm :
{ "type": "form", "display": "form", "title": "Metadata group", "components": [ { "type": "checkbox", "label": "Show advanced options", "key": "_showOptional_", "input": true, "tableView": false }, { "label": "Collection", "labelPosition": "left-left", "labelWidth": 30, "key": "collection", "input": true, "tableView": true, "inputType": "text", "hidden": true, "defaultValue": "all", "clearOnHide": false, "type": "select", "validate": { "required": true }, "dataType": "string", "dataSrc": "url", "valueProperty": "name", "data": { "url": "http://localhost:8080/services/dms/api/sys/docs/main-solr-configs", "headers": [ { "key": "Accept", "value": "application/json, text/plain, */*" } ] }, "disabled": true, "template": "<span>{{item.relData.config_s}}</span>" }, { "type": "datagrid", "key": "fieldRefs", "initEmpty": true, "addAnother": "Add", "hideLabel": true, "reorder": true, "components": [ { "label": "Metadata", "labelPosition": "left-left", "labelWidth": "0", "key": "schemaField", "input": true, "tableView": true, "inputType": "text", "type": "select", "dataType": "string", "dataSrc": "url", "valueProperty": "name", "data": { "url": "http://localhost:8080/services/dms/api/sys/types/schema-field/labels?fq=collection:({{data.collection}} OR all)", "headers": [ { "key": "Accept", "value": "application/json, text/plain, */*" } ] } }, { "label": "Required", "dataGridLabel": false, "tableView": true, "defaultValue": false, "key": "required", "type": "checkbox", "labelPosition": "left-left", "labelWidth": "0", "input": true }, { "label": "Multivalued", "dataGridLabel": false, "tableView": true, "defaultValue": false, "key": "multiValued", "type": "checkbox", "labelPosition": "left-left", "labelWidth": "0", "input": true, "disabled": false } ], "input": true, "tableView": false, "label": "Data Grid" }, { "label": "Form properties", "labelPosition": "left-left", "keyLabel": "Property", "addAnother": "Add", "tableView": "false", "key": "formProperties", "type": "datamap", "input": "true", "valueComponent": { "type": "textfield", "key": "", "label": "Value", "input": "true", "hideLabel": true, "tableView": "true" }, "customConditional": "show = data._showOptional_ === true" }, { "type": "button", "label": "Submit", "key": "submit", "disableOnInvalid": true, "input": true, "tableView": false } ] }
and here the render form :
I have tried lot of solutions
CustomConditional or LogicJson but maybe in wrong way! .
Beta Was this translation helpful? Give feedback.
All reactions