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

Sorting is not working for y axis properly

Ouverte
#661 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
299
Forks
159
Merge moyen
4 j 6 h
PR mergées (30 j)
4

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.