From 4c6d1e6d67d359142933eaa988dd889e794d4c22 Mon Sep 17 00:00:00 2001 From: mohamedsalem401 Date: Tue, 7 Jan 2025 13:07:28 +0200 Subject: [PATCH] Fix droppable for collection component --- .../model/collection_component/CollectionComponent.ts | 2 +- .../model/collection_component/CollectionComponent.ts | 8 ++++++++ .../__snapshots__/CollectionComponent.ts.snap | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/core/src/data_sources/model/collection_component/CollectionComponent.ts b/packages/core/src/data_sources/model/collection_component/CollectionComponent.ts index f04e7dd87..9c0cbbcbf 100644 --- a/packages/core/src/data_sources/model/collection_component/CollectionComponent.ts +++ b/packages/core/src/data_sources/model/collection_component/CollectionComponent.ts @@ -22,7 +22,7 @@ export default class CollectionComponent extends Component { const conditionalCmptDef = { ...props, type: CollectionComponentType, - dropbbable: false, + droppable: false, }; // @ts-ignore diff --git a/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts b/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts index fe4c4946f..983624cfd 100644 --- a/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts +++ b/packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts @@ -31,6 +31,14 @@ describe('Collection component', () => { em.destroy(); }); + test('Should be undroppable', () => { + const cmp = wrapper.components({ + type: CollectionComponentType, + })[0]; + + expect(cmp.get('droppable')).toBe(false); + }); + describe('Collection symbols', () => { test('Basic usage', () => { const cmp = wrapper.components({ diff --git a/packages/core/test/specs/data_sources/model/collection_component/__snapshots__/CollectionComponent.ts.snap b/packages/core/test/specs/data_sources/model/collection_component/__snapshots__/CollectionComponent.ts.snap index b90a3a6f6..26834581f 100644 --- a/packages/core/test/specs/data_sources/model/collection_component/__snapshots__/CollectionComponent.ts.snap +++ b/packages/core/test/specs/data_sources/model/collection_component/__snapshots__/CollectionComponent.ts.snap @@ -39,7 +39,7 @@ exports[`Collection component Stringfication Collection with dynamic datasource "start_index": 0, }, }, - "dropbbable": false, + "droppable": false, "type": "collection-component", } `;