From bbb0bb15b6e1902f98c8bc8f1d98fa5b96ac84f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 7 Aug 2015 13:20:31 +0200 Subject: [PATCH] add documentation --- js/stores/edition_list_store.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/stores/edition_list_store.js b/js/stores/edition_list_store.js index 90f48e8f..87b4df76 100644 --- a/js/stores/edition_list_store.js +++ b/js/stores/edition_list_store.js @@ -138,6 +138,10 @@ class EditionListStore { show: this.isEditionListOpenForPieceId[pieceId] ? !this.isEditionListOpenForPieceId[pieceId].show : true }; + // When loading all editions of a piece, closing the table and then applying the filter + // the merge fails, as the edition list is not refreshed when closed. + // Therefore in the case of a filter application when closed, we need to reload the + // edition list if(!this.isEditionListOpenForPieceId[pieceId].show) { // to clear an array, david walsh recommends to just set it's length to zero // http://davidwalsh.name/empty-array