-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I am migrating my vue 2 grid-layout to your vue 3 approach however I keep getting the following error:
Error: Invalid parameter layoutItem id passed
I decided to copy one of your examples in hopes of trying to debug this however I am getting the same exact error using this minimal example:
<GridLayout
ref="refLayout"
v-model:layout="testLayout"
>
<GridItem
v-for="item in testLayout"
:key="item.i"
class="test"
:h="item.h"
:i="item.i"
:w="item.w"
:x="item.x"
:y="item.y"
:min-h="item.minH"
:min-w="item.minW"
>
<span class="text">
{{ item.i }}
</span>
</GridItem>
</GridLayout>
I noticed in the vue devtools that theres always one vue-grid-placeholder added with an i of -1.

Your getLayoutItem method has the following check:
if (id === undefined || id === null || id.toString().trim().length === 0 || parseInt(id.toString()) < 0) {
throw new Error(ErrorMsg.INVALID_LAYOUT_ITEM_ID);
}
Is this causing issues? Or am I doing something wrong. I am quite lost as I've narrowed it down to this minimal example and still can't seem to solve it.
Would love to have some input on this, thanks.
Metadata
Metadata
Assignees
Labels
No labels