manishjanky / ngx-sortable Goto Github PK
View Code? Open in Web Editor NEWngx-sortable is an angular sortable list components that support drag and drop sorting
License: MIT License
ngx-sortable is an angular sortable list components that support drag and drop sorting
License: MIT License
Please Provide any suggestion for getting index inside ngx-sortable component
not work in safari mobile.
How to disable the sorting or drag and drob functionality. Please reply it's urgent.
Please add a new @input decorator for manage draggable "true/false" value in UL LI.
Like :
The following behaviour is reproducible on the demo implementation (at https://manishjanky.github.io/ngx-sortable/), too (not just in my environment):
Let's say I'm going to drag Amie under Goldie. The lowest position you can drag (drop target) to is OVER Goldie:
The drop target element stays there and does not disappear as expected.
Upgrading from 1.0.3 -> 2.1.0, Fails to build
Successful build.
ERROR in node_modules/ngx-sortable/lib/components/ngx-sortable/ngx-sortable.component.d.ts:31:21 - error TS2694: Namespace '"C:/Users/****/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
31 static ɵfac: i0.ɵɵFactoryDeclaration<NgxSortableComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-sortable/lib/components/ngx-sortable/ngx-sortable.component.d.ts:32:21 - error TS2694: Namespace '"C:/Users/****/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
32 static ɵcmp: i0.ɵɵComponentDeclaration<NgxSortableComponent, "ngx-sortable", never, { "items": "items"; "name": "name"; "showHeader": "showHeader"; "removeOnDropOutside": "removeOnDropOutside"; "listStyle": "listStyle"; }, { "dragStart": "dragStart"; "dropped": "dropped"; "moveDown": "moveDown"; "moveUp": "moveUp"; "remove": "remove"; "listSorted": "listSorted"; }, ["itemTemplate"], never, false>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-sortable/lib/ngx-sortable.module.d.ts:5:21 - error TS2694: Namespace '"C:/Users/****/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
5 static ɵfac: i0.ɵɵFactoryDeclaration<NgxSortableModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-sortable/lib/ngx-sortable.module.d.ts:6:21 - error TS2694: Namespace '"C:/Users/****/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
6 static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSortableModule, [typeof i1.NgxSortableComponent], [typeof i2.CommonModule], [typeof i1.NgxSortableComponent]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-sortable/lib/ngx-sortable.module.d.ts:7:21 - error TS2694: Namespace '"C:/Users/****/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
7 static ɵinj: i0.ɵɵInjectorDeclaration<NgxSortableModule>;
~~~~~~~~~~~~~~~~~~~~~
N/A
Hi Manish, I am unable to hide header and other ui components. Kindly, guide me to hide it and please provide a complete documentation so that I can understand about each and every element variables.
Al insertar un texto a la lista me colocar el primer index en undefined ajustar código para evitar este error.
NgxSortableComponent.prototype.handleDrop = function (droppedIndex) {
var item = this.items[this.draggedIndex];
if (item === undefined) { return false;} // "see" codigo temporal evita ordenar lista con undefined -1
this.items.splice(this.draggedIndex, 1);
this.items.splice(droppedIndex, 0, item);
this.draggedIndex = -1;
this.onDragOverIndex = -1;
this.listSorted.emit(this.items);
};
Used Sortablejs in one of the module, where i have provided the functionality of Manage widget, functionality wise, while i am dragging the list item from the manage widget, the associated widget should get change the position.
Issue : In the module, i have two size of widgets (small and large), While placing small widget next to large one, it is taking by default height and cause white space.
Expectation : Small widgets which is next to large, it should get auto adjust the empty space and other small widget should get placed up in the empty space.
Refer screenshots : SS
when an item dropped out of the zone selected drop zone to stay selected but better then it will remove and drag will cancel
1
When I add this package to my sharedModules file I get this error ERROR in node_modules/ngx-sortable/dist/ngx-sortable.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.
This likely means that the library (ngx-sortable) which declares NgxSortableModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
2
Also I want to know is it possible I use my own design instead of default list design?Something like this:
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
I just installed the plugin and added in app.module.ts and nothing else. I am getting this error Cannot read property 'id' of undefined at registerNgModuleType (core.js:35936)
Versions are as below
"ngx-sortable": "^1.0.3",
"@angular/animations": "^9.0.6",
"@angular/cdk": "^9.1.3",
"@angular/common": "^9.0.6",
"@angular/compiler": "^9.0.6",
"@angular/core": "^9.0.6",
"@angular/forms": "^9.0.6",
"@angular/http": "^7.2.16",
"@angular/platform-browser": "^9.0.6",
"@angular/platform-browser-dynamic": "^9.0.6",
"@angular/router": "^9.0.6",
I already checked demo of ngx-sortable in Firefox Browser but i don't see it is not work on firefox browser(drag and drop item) ?
i don't want to show sortable header how to remove it
Isn't possible to change the blue background color of active list. Has a !important in your css code, please remove this.
Thanks.
This bug is reproducible in the demo.
Expected behaviour:
Do you intend to Support for nested list with same items structure like the object below?
filteredObject: any[] = [
{ type: 'link', data: { label: 'Link 1', link: 'http://localhost:9000/' } },
{
type: 'group', data: {
label: 'Group 1', children: [
{ label: 'Link 3', link: 'http://localhost:9000/' },
{ label: 'Link 4', link: '#' }
]
}
},
{ type: 'link', data: { label: 'Link 1', link: '#' } }
];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.