@@ -2,10 +2,10 @@ import React from 'react';
22import MenuItem from '@material-ui/core/MenuItem' ;
33import Box from '@material-ui/core/Box' ;
44import {
5+ ListComponent ,
6+ NetPyNECoordsRange ,
57 NetPyNEField ,
68 NetPyNESelectField ,
7- NetPyNECoordsRange ,
8- ListComponent ,
99} from 'netpyne/components' ;
1010
1111export default class StimulationConditions extends React . Component {
@@ -29,14 +29,13 @@ export default class StimulationConditions extends React.Component {
2929 }
3030
3131 render ( ) {
32- const content = (
32+ const { name } = this . props ;
33+ return (
3334 < Box className = "scrollbar scrollchild" mt = { 1 } >
3435 < NetPyNEField id = "netParams.stimTargetParams.conds.pop" >
3536 < NetPyNESelectField
3637 model = {
37- `netParams.stimTargetParams['${
38- this . props . name
39- } ']['conds']['pop']`
38+ `netParams.stimTargetParams['${ name } ']['conds']['pop']`
4039 }
4140 method = "netpyne_geppetto.getAvailablePops"
4241 postProcessItems = { this . postProcessMenuItems }
@@ -45,26 +44,10 @@ export default class StimulationConditions extends React.Component {
4544 />
4645 </ NetPyNEField >
4746
48- < NetPyNEField id = "netParams.stimTargetParams.conds.cellModel" >
49- < NetPyNESelectField
50- model = {
51- `netParams.stimTargetParams['${
52- this . props . name
53- } ']['conds']['cellModel']`
54- }
55- fullWidth
56- method = "netpyne_geppetto.getAvailableCellModels"
57- postProcessItems = { this . postProcessMenuItems }
58- multiple
59- />
60- </ NetPyNEField >
61-
6247 < NetPyNEField id = "netParams.stimTargetParams.conds.cellType" >
6348 < NetPyNESelectField
6449 model = {
65- `netParams.stimTargetParams['${
66- this . props . name
67- } ']['conds']['cellType']`
50+ `netParams.stimTargetParams['${ name } ']['conds']['cellType']`
6851 }
6952 method = "netpyne_geppetto.getAvailableCellTypes"
7053 postProcessItems = { this . postProcessMenuItems }
@@ -75,7 +58,7 @@ export default class StimulationConditions extends React.Component {
7558
7659 < NetPyNECoordsRange
7760 id = "xRangeStimTarget"
78- name = { this . props . name }
61+ name = { name }
7962 model = "netParams.stimTargetParams"
8063 conds = "conds"
8164 items = { [
@@ -92,7 +75,7 @@ export default class StimulationConditions extends React.Component {
9275
9376 < NetPyNECoordsRange
9477 id = "yRangeStimTarget"
95- name = { this . props . name }
78+ name = { name }
9679 model = "netParams.stimTargetParams"
9780 conds = "conds"
9881 items = { [
@@ -109,7 +92,7 @@ export default class StimulationConditions extends React.Component {
10992
11093 < NetPyNECoordsRange
11194 id = "zRangeStimTarget"
112- name = { this . props . name }
95+ name = { name }
11396 model = "netParams.stimTargetParams"
11497 conds = "conds"
11598 items = { [
@@ -130,15 +113,11 @@ export default class StimulationConditions extends React.Component {
130113 >
131114 < ListComponent
132115 model = {
133- `netParams.stimTargetParams['${
134- this . props . name
135- } ']['conds']['cellList']`
116+ `netParams.stimTargetParams['${ name } ']['conds']['cellList']`
136117 }
137118 />
138119 </ NetPyNEField >
139120 </ Box >
140121 ) ;
141-
142- return content ;
143122 }
144123}
0 commit comments