File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ export interface GoToThisLocationButtonProps {
167167 currentBotLocation : BotPosition ;
168168 movementState : MovementState ;
169169 noOptions ?: boolean ;
170+ usePortal ?: boolean ;
170171}
171172
172173interface GoToThisLocationButtonState {
@@ -222,7 +223,7 @@ export class GoToThisLocationButton
222223 </ button >
223224 < Popover position = { Position . BOTTOM_RIGHT }
224225 isOpen = { this . state . open }
225- usePortal = { false }
226+ usePortal = { this . props . usePortal }
226227 className = { "go-button-axes" }
227228 popoverClassName = { "go-button-axes-popover" }
228229 target = { < button
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export function EditPlantStatus(props: EditPlantStatusProps) {
9696 return < div className = "grid half-gap" >
9797 < label > { t ( "Status" ) } </ label >
9898 < FBSelect
99- usePortal = { false }
99+ usePortal = { props . usePortal }
100100 list = { PLANT_STAGE_LIST ( ) }
101101 selectedItem = { PLANT_STAGE_DDI_LOOKUP ( ) [ plantStatus ] }
102102 onChange = { ddi =>
@@ -353,13 +353,14 @@ export const PlantSlugBulkUpdate = (props: PlantSlugBulkUpdateProps) => {
353353export interface EditWeedStatusProps {
354354 weed : TaggedWeedPointer ;
355355 updateWeed ( update : Partial < TaggedWeedPointer [ "body" ] > ) : void ;
356+ usePortal ?: boolean ;
356357}
357358
358359/** Select a `plant_stage` for a weed. */
359360export const EditWeedStatus = ( props : EditWeedStatusProps ) =>
360361 < FBSelect
361362 key = { props . weed . uuid }
362- usePortal = { false }
363+ usePortal = { props . usePortal }
363364 list = { WEED_STAGE_LIST ( ) }
364365 selectedItem = { WEED_STAGE_DDI_LOOKUP ( ) [ props . weed . body . plant_stage ] }
365366 onChange = { ddi =>
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ interface EditPlantProperty {
5454
5555export interface EditPlantStatusProps extends EditPlantProperty {
5656 plantStatus : PlantStage ;
57+ usePortal ?: boolean ;
5758}
5859
5960export interface EditDatePlantedProps extends EditPlantProperty {
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ const isPlantPointer = (plant: TaggedPlant): plant is TaggedPlantPointer =>
7070const GoButton = ( props : GoButtonProps ) =>
7171 props . dispatch &&
7272 < GoToThisLocationButton
73+ usePortal = { false }
7374 dispatch = { props . dispatch }
7475 locationCoordinate = { props . locationCoordinate }
7576 botOnline = { props . botOnline }
@@ -193,6 +194,7 @@ const PlantPopupControls = (props: PopupControlProps) => {
193194 </ div >
194195 < EditPlantStatus
195196 { ...commonProps }
197+ usePortal = { false }
196198 plantStatus = { plant . body . plant_stage } />
197199 </ div > }
198200 < div className = { "row grid-2-col" } >
@@ -231,7 +233,7 @@ const WeedPopupControls = (props: PopupControlProps) => {
231233 < div className = { "row grid-2-col" } >
232234 < div className = { "grid half-gap" } >
233235 < label > { t ( "Status" ) } </ label >
234- < EditWeedStatus weed = { weed } updateWeed = { update } />
236+ < EditWeedStatus weed = { weed } updateWeed = { update } usePortal = { false } />
235237 </ div >
236238 < EditPointRadius
237239 radius = { weed . body . radius }
@@ -268,6 +270,7 @@ const UtmPopupControls = (props: PopupControlProps) => {
268270 < div className = { "object-popup-mounted-tool-row row grid-2-col" } >
269271 < label > { t ( "Mounted Tool" ) } </ label >
270272 < ToolSelection
273+ usePortal = { false }
271274 tools = { props . tools }
272275 selectedTool = { mountedTool }
273276 onChange = { ( { tool_id } ) => {
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ interface ToolInputPropsBase {
142142export interface ToolSelectionProps extends ToolInputPropsBase {
143143 filterSelectedTool : boolean ;
144144 filterActiveTools : boolean ;
145+ usePortal ?: boolean ;
145146}
146147
147148export interface ToolInputRowProps extends ToolInputPropsBase {
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export const SlotDirectionInputRow = (props: SlotDirectionInputRowProps) => {
7070
7171export const ToolSelection = ( props : ToolSelectionProps ) =>
7272 < FBSelect
73- usePortal = { false }
73+ usePortal = { props . usePortal }
7474 list = { ( [ NULL_CHOICE ] as DropDownItem [ ] ) . concat ( props . tools
7575 . filter ( tool => ! props . filterSelectedTool
7676 || tool . body . id != props . selectedTool ?. body . id )
You can’t perform that action at this time.
0 commit comments