@topgatgets @GOPAL_CHANDRA_HALDER @HeyAveHey @nikzdevz It seems that the issues youāre experiencing are due on my part. Iām assuming I have the correct lines that need to be corrected, so I will try my best to fix them while still keeping the fix that was intended. Although because this isnāt an isolated issue, please switch back to 2.0.0 as @yusufcihan suggested.
When I use Dynamic card view then image showing currectly and selected image also mark all rightā¦and when again select then the image unmark all right.
.but when I use Dynamic components extention(downgrade 1.3v) then the image showing currectly but selected image mark as tick not showing but label is counted all right but problem is when click selected image again for unmark then showing an errorā¦ here all my blocksā¦I request all the Coder please indicate my incurrect blocks which can make an errorā¦
when I switch 2.0v then showing this error
The error actually explains itself-
Your are using number
to make you id Instead, make a variable id
and use it.
For each time in list
id = id+1
Your dynamic components kode here
Schema
{
"name": "ok",
"metadata-version": 1,
"author": "<your name>",
"platforms": [
"creator.kodular.io"
],
"keys": [
"count",
"text"
],
"components": [
{
"id": "{count}",
"type": "HorizontalArrangement",
"properties": {
"AlignHorizontal": 3,
"AlignVertical": 2,
"Width": -2,
"UseRoundCard": true,
"isCard": true
},
"components": [
{
"id": "space1_{count}",
"type": "SpaceView",
"properties": {
"WidthPercent": 2
}
},
{
"id": "button_{count}",
"type": "Button",
"properties": {
"Height": -1005,
"Width": -1010,
"Image": "Untitled.png"
}
},
{
"id": "space2_{count}",
"type": "SpaceView",
"properties": {
"Width": -2
}
},
{
"id": "label_{count}",
"type": "Label",
"properties": {
"FontBold": true,
"FontSize": 22,
"FontTypefaceImport": "Starzy.ttf",
"Text": "{text}",
"TextAlignment": 1
}
},
{
"id": "space3_{count}",
"type": "SpaceView",
"properties": {
"WidthPercent": 2
}
},
{
"id": "switch_{count}",
"type": "SwitchToggle",
"properties": {
"TextOff": "",
"TextOn": ""
}
},
{
"id": "space4_{count}",
"type": "SpaceView",
"properties": {
"Width": -2
}
}
]
}
]
}
I think iāve made a silly mistake but canāt figure it out for like 1 hour.
Itās my first time messing up with json so iām getting a little bit confused.
The uniqueness of IDs are determined correctly in 2.1.0. Thereās no reason to downgrade unless you are getting others errors that are not fixable.
He use broken key as the ID. So everytime loop goes Id of component is {count} instead of key value.
So downgrade should help.
It means- set global id to get global id+1
Same to that version too. The problem probably is on the blocks or schema.
Could u show us UsedIDs list?
Please downgrade to 2.0 until a fix has been published.
No problem, iām just learning how Schema works. Itās just a test. Looking forward to the new update. Keep up the good work!
Please help. If Dynamic Component contains
Vertical Arrangement
- Horizontal Arrangement 1 - other components - Horizontal Arrangement 2 - other components - Horizontal Arrangement 3 - other components
And I would like to remove Horizontal Arrangement 2 and other components under it. How can I do it?
Welcome, and your question is?
For the components under the horizontal arrangement, add an identifier so that you you know what component are from there. For example when you are creating those components, add HA1 or HA2 or HA3 as part of their ID and when you want to delete them, use:
When button delete HA1 got clicked:
for each used component ID, if ID contains HA1, remove component ID.
When button delete HA2 got clicked:
for each used component ID, if ID contains HA2 , remove component ID.
And so on.
Thank you for such a quick reply. However, when I remove, for example, HA1, the only HA1 component was removed, other component under HA1 still remain. Is there a way to read component id under HA1 ?
I try to use this block to read component id under HA1, but got an error.
By the way, I use Dynamic Component Version 2.0
What I meant if that you add the HA(number)
as part of the ID
. For example, HA1Arrangement, HA1Label1, HA1Label2, HA1Space1, HA1Image1, HA1Label3
and when you want delete the Horizontal Arrangement 1, then you do: for each used ID
, if ID
contains HA1
remove it because itās part of Horizontal Arrangement 1.
Thank you. It work. However, Is there a way to read component id under HA1 or read a schema of HA1?