ngx-drag-drop
ngx-drag-drop copied to clipboard
Angular 15 compatibility
Describe the bug
Importing DndModule
simply ends with incompatibility with index signature.
Error: node_modules/ngx-drag-drop/lib/dnd-dropzone.directive.d.ts:54:90 - error
Property '"dndDropzone"' is incompatible with index signature.
Type '{ alias: "dndDropzone"; required: false; }' is not assignable to type 'string'.
Just added DndModule
to the NgModule
import section.
I'm using Angular 15+ version.
Any support please.
I am adding error logs,
Error: node_modules/ngx-drag-drop/lib/dnd-draggable.directive.d.ts:48:92 - error TS2344: Type '{ dndDraggable: { alias: "dndDraggable"; required: false; }; dndEffectAllowed: { alias: "dndEffectAllowed"; required: false; }; dndType: { alias: "dndType"; required
: false; }; dndDraggingClass: { ...; }; ... 4 more ...; dndDisableDragIf: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"dndDraggable"' is incompatible with index signature.
Type '{ alias: "dndDraggable"; required: false; }' is not assignable to type 'string'.
48 static ɵdir: i0.ɵɵDirectiveDeclaration<DndDraggableDirective, "[dndDraggable]", never, { "dndDraggable": { "alias": "dndDraggable"; "required": false; }; "dndEffectAllowed": { "alias": "dndEffectAllowed"; "required": false; }; "dndType": { "alias": "dnd
Type"; "required": false; }; "dndDraggingClass": { "alias": "dndDraggingClass"; "required": false; }; "dndDraggingSourceClass": { "alias": "dndDraggingSourceClass"; "required": false; }; "dndDraggableDisabledClass": { "alias": "dndDraggableDisabledClass"; "req
uired": false; }; "dndDragImageOffsetFunction": { "alias": "dndDragImageOffsetFunction"; "required": false; }; "dndDisableIf": { "alias": "dndDisableIf"; "required": false; }; "dndDisableDragIf": { "alias": "dndDisableDragIf"; "required": false; }; }, { "dndSt
art": "dndStart"; "dndDrag": "dndDrag"; "dndEnd": "dndEnd"; "dndMoved": "dndMoved"; "dndCopied": "dndCopied"; "dndLinked": "dndLinked"; "dndCanceled": "dndCanceled"; }, never, never, true, never>;
Error: node_modules/ngx-drag-drop/lib/dnd-dropzone.directive.d.ts:54:90 - error TS2344: Type '{ dndDropzone: { alias: "dndDropzone"; required: false; }; dndEffectAllowed: { alias: "dndEffectAllowed"; required: false; }; dndAllowExternal: { alias: "dndAllowExte
rnal"; required: false; }; ... 4 more ...; dndDisableDropIf: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"dndDropzone"' is incompatible with index signature.
Type '{ alias: "dndDropzone"; required: false; }' is not assignable to type 'string'.
54 static ɵdir: i0.ɵɵDirectiveDeclaration<DndDropzoneDirective, "[dndDropzone]", never, { "dndDropzone": { "alias": "dndDropzone"; "required": false; }; "dndEffectAllowed": { "alias": "dndEffectAllowed"; "required": false; }; "dndAllowExternal": { "alias":
"dndAllowExternal"; "required": false; }; "dndHorizontal": { "alias": "dndHorizontal"; "required": false; }; "dndDragoverClass": { "alias": "dndDragoverClass"; "required": false; }; "dndDropzoneDisabledClass": { "alias": "dndDropzoneDisabledClass"; "required"
: false; }; "dndDisableIf": { "alias": "dndDisableIf"; "required": false; }; "dndDisableDropIf": { "alias": "dndDisableDropIf"; "required": false; }; }, { "dndDragover": "dndDragover"; "dndDrop": "dndDrop"; }, ["dndPlaceholderRef"], never, true, never>;
Hello @bohrasankalp , you can solve this problem? I am the same problem :/
Downgrade version of this package. Anyways I am missing a lot of things like smoothness. Nested list is a lot problematic. Rendering same template in nested list recursively I don't like. I want to limit list to 2-3 level. More over separate space to recognise drag area.
Try material.
okok thanks. Good work