File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ const MeterLocationProperties = (props: IProps) => {
5252 const [ hover , setHover ] = React . useState < ( 'submit' | 'clear' | 'none' ) > ( 'none' ) ;
5353
5454 const roles = useAppSelector ( SelectRoles ) ;
55+ const locationArray = React . useMemo ( ( ) => [ props . Location ] , [ props . Location ] ) ;
5556
5657 React . useEffect ( ( ) => {
5758 const key = props . Location . LocationKey ;
@@ -167,7 +168,7 @@ const MeterLocationProperties = (props: IProps) => {
167168 < div className = "col" >
168169 < div className = "pull-right" style = { { marginBottom : 10 } } >
169170 < LocationDrawingsButton
170- Locations = { [ props . Location ] }
171+ Locations = { locationArray }
171172 IsLoadingLocations = { props . LocationStatus !== 'idle' }
172173 />
173174 </ div >
Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ export default function NewMeterWizard(props: {IsEngineer: boolean}) {
9898 const [ showSubmit , setShowSubmit ] = React . useState < boolean > ( false ) ;
9999 const [ status , setStatus ] = React . useState < Application . Types . Status > ( 'unintiated' ) ;
100100
101+ const locationInfoArray = React . useMemo ( ( ) => [ locationInfo ] , [ locationInfo ] ) ;
102+
101103 React . useEffect ( ( ) => {
102104 if ( mStatus === 'unintiated' || mStatus === 'changed' )
103105 dispatch ( FetchMeter ( ) ) ;
@@ -407,7 +409,7 @@ export default function NewMeterWizard(props: {IsEngineer: boolean}) {
407409 || currentStep === connectionStep )
408410 return (
409411 < LocationDrawingsButton
410- Locations = { [ locationInfo ] }
412+ Locations = { locationInfoArray }
411413 />
412414 )
413415 else if ( currentStep >= additionalFieldMeterStep ) {
You can’t perform that action at this time.
0 commit comments