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

Module '"ngx-sortablejs"' has no exported member 'SortablejsOptions'.ts in Angular 12

Open kibria06cse opened this issue 4 years ago • 4 comments

I am using Angular 12 version and ngx-sortablejs v11.1.0.

I used this options on a previous angular version. But whenever I upgrade from the angular and ngx-sortablejs version, I am getting this error.

Is there any alternatitve?

kibria06cse avatar Dec 09 '21 09:12 kibria06cse

Had the same issue, this works for me:

import {Options} from 'sortablejs'; ..

eventOptions: Options = {
    onUpdate: () => this.eventUpdateCounter ++
  };

tehZeno avatar Dec 15 '21 09:12 tehZeno

I needed options for dragging beetween multiple list. I marked options as any type in typecsript without any imports and it works.... But only as temporary solution I hope import will be fixed soon :)

options: any = { group: 'groups', draggable: '.draggable', };

scuglik avatar Dec 15 '21 09:12 scuglik

I needed options for dragging beetween multiple list. I marked options as any type in typecsript without any imports and it works.... But only as temporary solution I hope import will be fixed soon :)

options: any = { group: 'groups', draggable: '.draggable', };

did you try my suggestion? (import {Options} from 'sortablejs';)

(strangely enough I only get onStart events, but for other options should hopefully just work)

tehZeno avatar Dec 15 '21 10:12 tehZeno

did you try my suggestion? (import {Options} from 'sortablejs';)

Yes with a little edit import { SortableOptions } from 'sortablejs'; to keep same types as in example and it works. Thank you very much

scuglik avatar Dec 15 '21 10:12 scuglik