mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
Use object to construct TransitionModel to improve readability
This commit is contained in:
parent
7d91832d74
commit
d6a9873bd0
@ -113,7 +113,12 @@ let AccordionListItemTableEditions = React.createClass({
|
|||||||
showExpandOption = true;
|
showExpandOption = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let transition = new TransitionModel('editions', 'editionId', 'bitcoin_id', (e) => e.stopPropagation() );
|
const transition = new TransitionModel({
|
||||||
|
to: 'editions',
|
||||||
|
queryKey: 'editionId',
|
||||||
|
valueKey: 'bitcoin_id',
|
||||||
|
callback: (e) => e.stopPropagation()
|
||||||
|
});
|
||||||
|
|
||||||
const columnList = [
|
const columnList = [
|
||||||
new ColumnModel(
|
new ColumnModel(
|
||||||
|
@ -28,7 +28,7 @@ export class ColumnModel {
|
|||||||
* our selfes, using this TransitionModel.
|
* our selfes, using this TransitionModel.
|
||||||
*/
|
*/
|
||||||
export class TransitionModel {
|
export class TransitionModel {
|
||||||
constructor(to, queryKey, valueKey, callback) {
|
constructor({ to, queryKey, valueKey, callback }) {
|
||||||
this.to = to;
|
this.to = to;
|
||||||
this.queryKey = queryKey;
|
this.queryKey = queryKey;
|
||||||
this.valueKey = valueKey;
|
this.valueKey = valueKey;
|
||||||
|
Loading…
Reference in New Issue
Block a user