Last active
January 14, 2020 17:24
-
-
Save gtb104/a342dd696126eb2340a2c13cb02c2ada to your computer and use it in GitHub Desktop.
ember-sortable bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { later } from '@ember/runloop'; | |
export default Controller.extend({ | |
appName: 'Bug ember-sortable', | |
columns: [ | |
{ title: 'AAAAA' }, | |
{ title: 'BBBBB' }, | |
{ title: 'CCCCC' }, | |
{ title: 'DDDDD' }, | |
{ title: 'EEEEE' } | |
], | |
// didInsertElement() { | |
// this._super(...arguments); | |
// later(this, this.addData, 5000); | |
// }, | |
// addData() { | |
// this.set('columns', []); | |
// }, | |
actions: { | |
reorderColumns(newOrder) { | |
this.set('columns', newOrder); | |
}, | |
removeFromColumns(meta) { | |
const newList = this.columns.filter((d) => d.title !== meta.title); | |
this.set('columns', newList); | |
}, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.thumb { | |
display: inline-block; | |
position: absolute; | |
right: 0; | |
width: 2rem; | |
text-align: center; | |
cursor: pointer; | |
} | |
li { | |
display: block; | |
background-color: lightgrey; | |
width: 10rem; | |
position: relative; | |
} | |
li:hover { | |
background-color: lightblue; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
}, | |
"addons": { | |
"ember-sortable": "2.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment