mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
add persistent selected rows
This commit is contained in:
parent
92be6a63e8
commit
d71e6baa19
@ -42,6 +42,7 @@ let TableItemSubtable = React.createClass({
|
||||
'open': false
|
||||
});
|
||||
} else {
|
||||
|
||||
EditionListActions.fetchEditionList(this.props.columnContent.id);
|
||||
this.setState({
|
||||
'open': true,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
import alt from '../alt';
|
||||
import EditionsListActions from '../actions/edition_list_actions';
|
||||
|
||||
@ -8,6 +10,13 @@ class EditionListStore {
|
||||
}
|
||||
|
||||
onUpdateEditionList({pieceId, editionListOfPiece}) {
|
||||
if(this.editionList[pieceId]) {
|
||||
this.editionList[pieceId].forEach((edition, i) => {
|
||||
// This uses the index of the new editionList for determining the edition.
|
||||
// If the list of editions can be sorted in the future, this needs to be changed!
|
||||
editionListOfPiece[i] = React.addons.update(edition, {$merge: editionListOfPiece[i]});
|
||||
})
|
||||
}
|
||||
this.editionList[pieceId] = editionListOfPiece;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user