[F/OS] - Dynamic Components Extension (for every component) 2.3.0

@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.

4 Likes

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-

4 Likes

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
2 Likes
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
                }
            }
        ]
    }
]

}

blocks(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.

2 Likes

Try it on version 2.0 if u use 2.1.0

2 Likes

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.

2 Likes

He use broken key as the ID. So everytime loop goes Id of component is {count} instead of key value.

So downgrade should help.

1 Like

It means- set global id to get global id+1

3 Likes

Same to that version too. The problem probably is on the blocks or schema.

1 Like

Could u show us UsedIDs list?

Seems something wrong with the parameters.

1 Like

Please downgrade to 2.0 until a fix has been published.

2 Likes

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! :+1:

4 Likes

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?

2 Likes

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.

2 Likes

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

1 Like

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.

2 Likes

Thank you. It work. However, Is there a way to read component id under HA1 or read a schema of HA1?

2 Likes