From 016e1289f385cd093960506599fa08dbb646df7a Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Mon, 24 Aug 2015 13:29:48 -0700 Subject: [PATCH] sorting --- pub/work/src/js/components/ListComponent.coffee | 2 +- pub/work/src/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pub/work/src/js/components/ListComponent.coffee b/pub/work/src/js/components/ListComponent.coffee index 4bbc2b7a2c..0659712c28 100644 --- a/pub/work/src/js/components/ListComponent.coffee +++ b/pub/work/src/js/components/ListComponent.coffee @@ -27,7 +27,7 @@ module.exports = recl @$el = $ @getDOMNode() @$items = @$el.find('.items').children() - _focus: (e,i) -> @setState {selected:Number(i.props.index)} + _focus: (e,i) -> @setState {selected:Number(i.props.item.sort)} _dragStart: (e,i) -> @dragged = i.dragged diff --git a/pub/work/src/js/main.js b/pub/work/src/js/main.js index de4f27d221..016a9c434d 100644 --- a/pub/work/src/js/main.js +++ b/pub/work/src/js/main.js @@ -649,7 +649,7 @@ module.exports = recl({ }, _focus: function(e, i) { return this.setState({ - selected: Number(i.props.index) + selected: Number(i.props.item.sort) }); }, _dragStart: function(e, i) {