Skip to content

Commit ae995ba

Browse files
collins-selfcollins-self
authored andcommitted
fixed disable on MeterLocationProperties
1 parent 9754567 commit ae995ba

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/CommonComponents/LocationDrawingsModal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ interface IProps {
2929
Location: OpenXDA.Types.Location;
3030
Show: boolean;
3131
SetShow: (b: boolean) => void;
32+
/** For use when keeping track of a single Location's error to display */
3233
Errors: (e: string[]) => void;
33-
/**
34-
* For use with multiple LocationDrawingsModal's
35-
*/
34+
/** For use with multiple locations with multiple LocationDrawingsModal's */
3635
AddLocationWithErrors?: (locationErrorsMap: Map<OpenXDA.Types.Location, string[]>) => void;
37-
RemoveLocationWithErrors?: (l: OpenXDA.Types.Location) => void;
36+
/** For use with multiple locations with multiple LocationDrawingsModal's */
37+
RemoveLocationWithErrors?: (locationErrorsMap: OpenXDA.Types.Location) => void;
3838
}
3939

4040
const LocationDrawingsModal = (props: IProps) => {

Source/Applications/SystemCenter/wwwroot/Scripts/TSX/SystemCenter/Meter/PropertyUI/MeterLocationProperties.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const MeterLocationProperties = (props: IProps) => {
170170
<div className="pull-right" style={{ marginBottom: 10 }}>
171171
<button
172172
className={drawingsModalErrors.length > 0 ? "btn btn-primary disabled" : "btn btn-primary"}
173-
onClick={() => setShowDrawingsModal(true)}
173+
onClick={() => drawingsModalErrors.length > 0 ? null : setShowDrawingsModal(true)}
174174
data-tooltip={"DrawingsModal"}
175175
onMouseEnter={() => setHover('drawings')}
176176
onMouseLeave={() => setHover('none')}

0 commit comments

Comments
 (0)