Browse Source

Fix droppable for collection component

collection-component
mohamedsalem401 2 years ago
parent
commit
4c6d1e6d67
  1. 2
      packages/core/src/data_sources/model/collection_component/CollectionComponent.ts
  2. 8
      packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts
  3. 2
      packages/core/test/specs/data_sources/model/collection_component/__snapshots__/CollectionComponent.ts.snap

2
packages/core/src/data_sources/model/collection_component/CollectionComponent.ts

@ -22,7 +22,7 @@ export default class CollectionComponent extends Component {
const conditionalCmptDef = { const conditionalCmptDef = {
...props, ...props,
type: CollectionComponentType, type: CollectionComponentType,
dropbbable: false, droppable: false,
}; };
// @ts-ignore // @ts-ignore

8
packages/core/test/specs/data_sources/model/collection_component/CollectionComponent.ts

@ -31,6 +31,14 @@ describe('Collection component', () => {
em.destroy(); em.destroy();
}); });
test('Should be undroppable', () => {
const cmp = wrapper.components({
type: CollectionComponentType,
})[0];
expect(cmp.get('droppable')).toBe(false);
});
describe('Collection symbols', () => { describe('Collection symbols', () => {
test('Basic usage', () => { test('Basic usage', () => {
const cmp = wrapper.components({ const cmp = wrapper.components({

2
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, "start_index": 0,
}, },
}, },
"dropbbable": false, "droppable": false,
"type": "collection-component", "type": "collection-component",
} }
`; `;

Loading…
Cancel
Save