adopted-ember-addons / adopted-ember-addons/ember-sortable

Sorting is not working for y axis properly

Aperta
#661 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
299
Fork
159
Merge medio
4g 6h
PR unite (30g)
4

Descrizione

Applied the boiler plate provided in the documentation exactly as it is with a couple of containers with the model passed to the addon as an array of color which differentiates each container for visualizing the sorting functionality.

Along the default direction which is the y axis sorting seems to only work with the first two elements that too if the second element is dragged over the first element. Just to ensure i changed the sort direction to x axis (no other changes) it worked fine. But with default y axis i got this bug.

index.hbs
```
{{page-title "Index"}}
{{!-- template-lint-disable no-inline-styles --}}
{{!-- template-lint-disable style-concatenation --}}


{{#each this.model as |color index|}}
Container-{{index}}
^

{{/each}}

```

controller/index.js
```
import Controller from '@ember/controller';
import { action } from '@ember/object';

export default class IndexController extends Controller {

@action
reorderItems(part) {
this.model = part;
}
}

```

routes/index.js
```
import Route from '@ember/routing/route';

export default class IndexRoute extends Route {
model() {
return ['red', 'blue', 'green', 'teal', 'purple'];
}

setupController(controller, model) {
controller.set('model', model);
}
}
```

Versions used:
- ember-cli@3.28.6
- ember-sortable@3.0.0

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.