loadFromJsonLogic not working for multi-nested group fields
See original GitHub issueIn my fields config, I have an “owner” group and with an email subfield.
{
owner: {
subfields: {
email: {
label: 'Email',
type: 'text',
valueSources: ['value'],
}
},
label: 'Owner',
type: '!group',
},
}
When I use getTree(loadFromJsonLogic({ or: [{ '==': [{ var: 'owner.email' }, '123'] }] }, config))
, I get the following string and the query builder does not get populated correctly
{
"type":"group",
"id":"988a9a8a-cdef-4012-b456-7171130265c3",
"children1":{
"899babaa-0123-4456-b89a-b171130265c2":{
"type":"rule",
"properties":{
"field":"owner.email",
"operator":"equal",
"value":[
"123"
],
"valueSrc":[
"value"
],
"valueType":[
"text"
]
}
}
},
"properties":{
"conjunction":"OR",
"not":false
}
}
Shouldn’t the “type” in the above JSON be “rule_group” instead of “rule”?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
loadFromJsonLogic not working for multiselect operators #386
I create config with the following field: { "tagId": { "label": "Tag", "type": "select", "fieldSettings": { "listValues": [ { "value": 1, ...
Read more >Field group not working in Form displays [#2923308] - Drupal
If fields are grouped within the form display of a content type, it displays the hierarchy correctly within the manage content types view, ......
Read more >applying the same location for multiple acf-groups - Stack ...
Group of fields for both (page and custom post type). Here is my current not working configuration for setting locations for these three...
Read more >Group Field | Form Designer | User Guide | Epi Info - CDC
A Group field is a way to group together one or more fields on a page for visual and practical purposes. Visually, a...
Read more >Create a grouped or summary report - Microsoft Support
Access makes working with grouped reports easy. ... When applying grouping, Access moves the grouping field to the leftmost column, and groups the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh definitely, sorry I think my Sandbox link didn’t get updated. Here’s the updated link with the issue - https://codesandbox.io/s/eager-architecture-ojqjf?file=/src/demo/demo.tsx
Notice how when there’s only one rule, the groups are not populated properly. Instead of user > details > login, I see user.details > login.
@ymittal I see some visual issues with nested groups:
But what issue with loading from json-logic you have? If you mean duplication of “user.details.login == ‘asadas’”, I don’t consider this as issue.