mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +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
|
'open': false
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
EditionListActions.fetchEditionList(this.props.columnContent.id);
|
EditionListActions.fetchEditionList(this.props.columnContent.id);
|
||||||
this.setState({
|
this.setState({
|
||||||
'open': true,
|
'open': true,
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
import alt from '../alt';
|
import alt from '../alt';
|
||||||
import EditionsListActions from '../actions/edition_list_actions';
|
import EditionsListActions from '../actions/edition_list_actions';
|
||||||
|
|
||||||
@ -8,6 +10,13 @@ class EditionListStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onUpdateEditionList({pieceId, editionListOfPiece}) {
|
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;
|
this.editionList[pieceId] = editionListOfPiece;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user