ngx-sortablejs icon indicating copy to clipboard operation
ngx-sortablejs copied to clipboard

Support Angular 13

Open xibriz opened this issue 4 years ago • 19 comments
trafficstars

Are there any plans to keep up with the development of Angular?

Package "ngx-sortablejs" has an incompatible peer dependency to "@angular/common" (requires "^11.0.0" (extended), would install "13.0.1").

Package "ngx-sortablejs" has an incompatible peer dependency to "@angular/core" (requires "^11.0.0" (extended), would install "13.0.1").

xibriz avatar Nov 16 '21 09:11 xibriz

same here.

p3x-robot avatar Nov 19 '21 07:11 p3x-robot

  • angular update it works
ng update 
  • ngx-bootstrap upgrade broke: Module '"ngx-bootstrap"' has no exported member 'BsDropdownModule', just need to be changed: import { BsDropdownModule } from 'ngx-bootstrap/dropdown';

  • "sortablejs": ">=1.14.0" also work

  • good practice is to add also peerDependencies: "@types/sortablejs": "^1.10.7"

sysmat avatar Nov 29 '21 07:11 sysmat

Same for me:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! @angular/common@"~13.1.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^11.0.0" from [email protected]

jalalh14 avatar Dec 15 '21 23:12 jalalh14

Hi team, any update on this to support Angular 13 :) ?

ducthang310 avatar Jan 11 '22 07:01 ducthang310

Is this repository actively maintained? We're using this in several projects and we need to upgrade to Angular 13 as soon as possible. I don't think the current version would work with Angular 13, correct?

inexuscore avatar Feb 22 '22 10:02 inexuscore

@inexuscore if you would browse a little you would find that NO, this is very dead :D support for angular 12 and angular 13 is waiting, each in their separate PRs, so most you can do is to use a fork that you can find on npmjs.com :/

Reixko avatar Feb 22 '22 15:02 Reixko

@Reixko not entirely dead, I've been using this repo in several projects lately. I managed to install the latest release using the --legacy-peer-deps flag, working fine with Angular 13 and RxJs 6+. It'd be nice to bring this repo up-to-date though.

inexuscore avatar Feb 22 '22 16:02 inexuscore

I suggest you move to cdk drag drop. You will avoid such situation like that. I dropped ngx-sortablejs and implemented cdk drag drop. working minimal example :

Screenshot 2022-02-28 at 14 24 09

and add CSS:

.cdk-drag-animating {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

.list-options.cdk-drop-list-dragging .list-options__item:not(.cdk-drag-placeholder) {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}

and ts:

drop(event: CdkDragDrop<string[]>, controlOptions): void {
    moveItemInArray(controlOptions, event.previousIndex, event.currentIndex);
  }

of course here you have more examples: https://material.angular.io/cdk/drag-drop/examples

areksliwa-modento avatar Feb 28 '22 13:02 areksliwa-modento

@areksliwa-modento CDK D&D is only good as long as you can live with single direction sorting -> either vertical or horizontal. I would say most people that are looking for alternatives(like me) need a sorting in a matrix(so combined vertical with horizontal sorting), which is almost impossible with angular's cdk :D I have tried it....... there is a "hack" out there, that will allow you to do mentioned matrix sorting, but that only works with version up to 10.something.something, which is not compatible with Angular12+. Oh forgot to mention - there is NO official support for matrix sorting in angular's cdk ;)

Reixko avatar Feb 28 '22 14:02 Reixko

Any updates to support Angular 13?

Yura13 avatar Mar 23 '22 06:03 Yura13

Any news?

alexanderpivanov avatar May 04 '22 11:05 alexanderpivanov

Is this project dead? :D Should we do fork for new updates?

Klapik avatar Jun 28 '22 09:06 Klapik

Any updates on this issue?

saurabh47 avatar Jul 20 '22 09:07 saurabh47

Does anyone know good alternatives for the angular 15 with the mixed orientation support?

andreyv99 avatar Nov 23 '22 17:11 andreyv99

I can't say anything about the quality of this fork, but someone updated this to be compatible with Angular 15. YMMV: https://github.com/DustFoundation/ngx-sortablejs, NPM: https://www.npmjs.com/package/@dustfoundation/ngx-sortablejs

jfahrenkrug avatar Feb 22 '23 15:02 jfahrenkrug

Any news on this? The latest version of Angular is 16 now.

h3902340 avatar Jul 20 '23 03:07 h3902340

For anyone who might care, found an alternative solution to support sortablejs for all angulars after 13. https://www.npmjs.com/package/nxt-sortablejs?activeTab=readme

avpeshkov avatar Feb 07 '24 13:02 avpeshkov