![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ngx-mega-simple-drag-drop-list
Advanced tools
Angular 2/3/4/5/6/7 Drag Drop Simple Reordable List Items
Angular 2/3/4/5/6/7 Drag Drop Simple Reordable List Items
*had to photoshop the little dragging cursor. Guess it will look different in different OS's and browsers
https://ives.me/NgxMegaSimpleDragDropListDemoWithNpmPackage/
npm i ngx-mega-simple-drag-drop-list
app.module.ts
import { NgxMegaSimpleDragDropListModule } from 'ngx-mega-simple-drag-drop-list';
@NgModule({
imports: [
NgxMegaSimpleDragDropListModule
],
})
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
items = [1, 2, 3, 4, 5];
constructor() { }
ngOnInit() {}
onDropped(newItems) {
this.items = newItems;
}
}
app.component.html
<div class="card" *ngFor="let item of items;let index = index;" megaSimpleDndList [items]="items" [index]="index" (dropped)="onDropped($event)">
<div class="card-content">
{{item}}
</div>
</div>
app.component.css
.card {
cursor: move;
float: left;
position: relative;
margin: .5rem 1rem 1rem 0;
background-color: #fff;
transition: box-shadow opacity .25s;
border-radius: 2px;
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
}
.card .card-content{
pointer-events: none; /*make sure you add this to all card children. This ensures only the card is dragged*/
padding: 40px;
border-radius: 0 0 2px 2px;
font-size: 30px;
text-align: center;
}
.hover {
box-shadow: 0px 0px 25px 0px rgba(0,0,0,0.75);
}
.draggin {
opacity: 0.4;
}
Input | Type | Default | Required | Description |
---|---|---|---|---|
items | array | any[] | yes | Array to reorder |
index | number | null | yes | Index of the current element |
hoverStyle | string | hover | no | Css class name when hovering |
dragStyle | string | draggin | no | Css class name when dragging the element |
isSwap | boolean | false | no | Controls if you want to swap items in the array or reorder the whole array |
Output | Type | Description |
---|---|---|
(dropped) | array | Returns the array |
FAQs
Angular 2/3/4/5/6/7 Drag Drop Simple Reordable List Items
The npm package ngx-mega-simple-drag-drop-list receives a total of 147 weekly downloads. As such, ngx-mega-simple-drag-drop-list popularity was classified as not popular.
We found that ngx-mega-simple-drag-drop-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.