diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-08 09:21:37 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-17 17:12:47 +0100 |
commit | aaf176f2c1cd618e56e08ac67e10cfe79fb402ee (patch) | |
tree | 012172999e9d32e1183f0d7401d72c36865a74d0 /app/assets/javascripts/boards/stores/boards_store.js.es6 | |
parent | 9982dc1d0ea67f1de58b708b519d149547b50890 (diff) | |
download | gitlab-ce-aaf176f2c1cd618e56e08ac67e10cfe79fb402ee.tar.gz |
Updates new dropdown list when removing lists
Diffstat (limited to 'app/assets/javascripts/boards/stores/boards_store.js.es6')
-rw-r--r-- | app/assets/javascripts/boards/stores/boards_store.js.es6 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6 index 22c84de66a9..fcd5ada2265 100644 --- a/app/assets/javascripts/boards/stores/boards_store.js.es6 +++ b/app/assets/javascripts/boards/stores/boards_store.js.es6 @@ -18,10 +18,15 @@ if (persist) { list.save(); this.removeBlankState(); + this.updateNewListDropdown(); } return list; }, + updateNewListDropdown: function () { + const data = $('.js-new-board-list').data('glDropdown').renderedData; + $('.js-new-board-list').data('glDropdown').renderData(data); + }, shouldAddBlankState: function () { // Decide whether to add the blank state let addBlankState = true; @@ -73,6 +78,8 @@ this.state.lists = _.reject(this.state.lists, (list) => { return list.id === id; }); + + this.updateNewListDropdown(); }, moveList: function (oldIndex, newIndex) { const listFrom = this.findList('position', oldIndex), |