Browse Source

Fix droppable for collection component

pull/6359/head
mohamedsalem401 1 year 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 = {
...props,
type: CollectionComponentType,
dropbbable: false,
droppable: false,
};
// @ts-ignore

8
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({

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

Loading…
Cancel
Save