Giter VIP home page Giter VIP logo

kreuzerk / ng-sortgrid Goto Github PK

View Code? Open in Web Editor NEW
144.0 6.0 19.0 5.83 MB

🧐 A grid that allows you to sort all items via drag & drop. Items can be sorted in all directions (↕️ and ↔️). You can also select and sort multiple items at the same time by pressing ctrl and click on the item.

Home Page: https://kreuzerk.github.io/ng-sortgrid/

License: MIT License

JavaScript 0.47% TypeScript 83.11% HTML 11.81% CSS 4.61%
drag-and-drop sorting multiselect angular hacktoberfest

ng-sortgrid's Issues

Angular 15 compatibility

Hi,

First of all, thanks for your package !

Do you prepare an Angular 15 compliant version ?

Thanks :)

hi, i meet this error

CommonDemoComponent.html:16 ERROR NullInjectorError: StaticInjectorError(AppModule)[NgsgItemDirective -> NgsgSortService]:
StaticInjectorError(Platform: core)[NgsgItemDirective -> NgsgSortService]:
NullInjectorError: No provider for NgsgSortService!

Angular 16 support

Hey,
first of all thank you a lot for creating and maintaining this project. You helped my project a lot over the last year.

Do you plan to update the package to Angular 16 and if so do you have an eta for the release?

Thanks a lot.

feature: add 2 new inputs: disableSorting and disableMultipleSorting

Need implement 2 new inputs like this.

<div class="example-container">
  <div *ngFor="let item of items"
       ngSortgridItem
       [disableSorting]="false"
       [disableMultipleSorting]="true"
       [ngSortGridItems]="items"
       (sorted)="logger($event)"
  >
    <div class="example-box">{{item}}</div>
  </div>
</div>

Update docs

Mention in the docs that the values you get on the sorted output are not the original objects.

[RFC] Sorted output interface

It would be pretty nice to have a public (exported by the library) interface for sorted output that will contain not only a sorted list but previous and current indexes.

And thanks for the great library!

Can't apply the directive

It fails at this step

  import {NgsgModule} from 'ng-sortgrid'
  ...
  @NgModule({
    imports: [BrowserModule, NgsgModule],
    //...
  })  
  ...

Cannot find module 'ng-sortgrid' or its corresponding type declarations

Value at position 1 in the NgModule.imports of AppModule is not a reference
Value could not be determined statically

I'm using Angular 14

working with shift-selection problems

For this we assume the following layout:

1 2 3 4  5
6 7 8 9 10
  1. single item is not always selected (bug)

steps2repoduce: normal click on [1] > then shift click on [1] > [1] is not selected
fix: [1] should be selected

  1. SOME NAME FOR THIS POINT (bug)

steps2repoduce: shift click [1] + [2] > normal click [3] and drag > [1] + [2] is dragged
fix: [1] + [2] should be deselected and [3] should be dragged

  1. remove the selection (feature)

steps2repoduce: shift click [1] + [2] > normal click somewhere on the drag grid > nothing happens
fix: [1] + [2] should be deselected

  1. moving horizontal selection to edge (bug)

steps2repoduce: shift click [1] + [2] > drag over 5 > results in unexpected order
fix: i expect:

3 4 5 1  2
6 7 8 9 10
  1. moving vertical selection

steps2repoduce: shift click [1] + [6] > drag over 5 > results in unexpected order
fix: i expect: (not entirely sure)

2 3 4  5 1
7 8 9 10 6

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

duplicate selected col while draging

When I select multi-columns and drag, columns are duplicate
basically some dealy issue in plugin when we drag and during this if some dealy plugin move product but we still drag so it make copy

Missing CSS file

"node_modules/ng-sortgrid/dist/lib/ngsg.css"

The file is not included in the npm package
"ng-sortgrid": "^3.0.1",

image

Change type of a placeholder element

Hello!
In my project it's need to change element's type when drag element changes its position.
For example, first three elements should be like ElemA, and other should be like ElemB. These are different components.
In static everything is OK, but when I'm dragging element a placeholder element appears, and it don't changes because it's copy of dragged element.

Q: How to change the placeholder element's type?
image
image

How to use on mobile ?

Hi,

I was wondering if it was useable on mobile ? It seems to me that touch events are not working.

Thank you

Please, add new event

Please, add event for dropping drags from one sortgriditem in another sortgriditem.

NPM peerDependencies warnings

I've just updated to version 4.0.0 of ng-sortgrid.
Unfortunately the following warnings of NPM haven't dissappeared yet:

npm WARN [email protected] requires a peer of @angular/common@^7.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^7.2.0 but none is installed. You must install peer dependencies yourself.

I'm using the newest version of Angular, version 10.0.14.
"@angular/core": "10.0.14"
"@angular/common": "10.0.14"

Please update your peerDependencies in your package.json.

Best regards,
Andy

Angular 17

Hi! Thanks a lot for your great lib! Do you have any plans to update it for Angular v17?

Scrolling not working on multiple item drag and drop for sorting on Windows

Hi,

I am using this package for my site, in-order to sort items by drag and drop. When I select multiple items and drag for sorting, browsers like firefox, edge, chrome in windows machines are not auto-scrolling on moving the dragged items to top or bottom as like in the browsers used in linux/mac machines.

I also checked your demo(scrolling) on windows browsers where I experienced the same.

Not compatible with lazy loaded projects

Hey there :-)

I just tried your sort-grid. Sadly, it does not even compile when not using in the root app module. And when using in the root module and then trying to add functionality to a submodule, it does not find the service anymore.

I guess you just need to provide the service in the NgsgModule instead of root ?

Then it would be correctly scoped.

LG

ng-sortgrid doesn't work in lazy loaded modules

Hi Kevin,

Thanks a lot for creating ng-sortgrid !

ng-sortgrid works perfectly fine in app.component.html or when used in a component without lazy loading.

While Using ng-sortgrid in lazy loaded module. I am getting the following error-

Can't bind to 'item' since it isn't a known property of 'ngsg-card'.

  1. If 'ngsg-card' is an Angular component and it has 'item' input, then verify that it is part of this module.
  2. If 'ngsg-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

is it possible to use ng-sortgrid in lazy loaded modules?

"@angular/cli": "~8.3.17"
"ng-sortgrid": "1.3.3"

Best Regards
Nik

6.0.0 still depends on Angular 12

Hi,

Thanks for the Angular 13 Update. But it still show up errors because the dependencies still using Angular 12

Any fixes coming up ?

ng-sg-active not implemented

And as far as I could see in the source code .ng-sg-active is not implemented anymore? Should be possible to style the dragged element

No provider for NgsgSortService

Hi. I think that it is the same issues as #30 but it is already closed. When I use ng-sortgrid from demo folder from github not from npm or yarn - it works well

NullInjectorError: StaticInjectorError(AppModule)[NgsgItemDirective -> NgsgSortService]: StaticInjectorError(Platform: core)[NgsgItemDirective -> NgsgSortService]: NullInjectorError: No provider for NgsgSortService! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:4200/vendor.js:76429:25) at resolveToken (http://localhost:4200/vendor.js:87622:24) at tryResolveToken (http://localhost:4200/vendor.js:87566:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4200/vendor.js:87468:20) at resolveToken (http://localhost:4200/vendor.js:87622:24) at tryResolveToken (http://localhost:4200/vendor.js:87566:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4200/vendor.js:87468:20) at resolveNgModuleDep (http://localhost:4200/vendor.js:95938:29) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (http://localhost:4200/vendor.js:96609:16) at resolveNgModuleDep (http://localhost:4200/vendor.js:95938:29)

Problem with nested lists

Currently, I am using this library to sort a list and everything works fine. Now we want to have a nested list and sort every list independent of each other. For that I thought that I only have to use the directives in the sublist but give it another group name. But unfortunately that doesn't work as expected. I've attached a video that shows the behavior.

Am I doing something wrong or is this not supported yet?

Bildschirmaufnahme.2023-10-20.um.12.32.55.mov

Version 5 peer dependencies for Angular 10 instead of 12

You wrote in your release that version 5 is adjusted for Angular 12, but in your library's package.json there are still the peer dependencies for Angular 10.

"peerDependencies": {
    "@angular/common": "^10.0.0",
    "@angular/core": "^10.0.0"
  }

Shouldn't it be

"peerDependencies": {
    "@angular/common": "^12.0.0",
    "@angular/core": "^12.0.0"
  }

?

Angular 18 support

ng-sortgrid did not like that we wanted to upgrade to Angular 18

npm error Could not resolve dependency:
npm error peer @angular/common@"^17.0.0" from [email protected]
npm error node_modules/ng-sortgrid
npm error   ng-sortgrid@"17.0.0" from the root project

Card item select and drag on scrolling mouse wheel in Windows OS browsers

Hi Support,

I have used your sortgrid package in my application, in which I listed products on Card grid. On selecting the product card and dragging, it autoscroll by default. My issue is in windows os browsers(edge, chrome, firefox), on selecting the product card on mouse left click and when scrolling the mouse wheel, card is not dragging. But the same scenario is working well in MAC OS browsers.

I tried your demo version in Windows OS browsers too, it didn't work as my need. Is there any fix for this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.