Disable pop-up opening when selecting device

smsoousaa year ago

Hello everybody! Is there any way to disable the opening of the popup when selecting the device in the "device list"? And allow the opening of the popup only when clicking on the device's avatar on the map.
I tried some changes in
DeviceRow.js

onClick={() => dispatch(devicesActions.select(item.id))}

and
store/devices.js

    select(state, action) {
      state.selectedId = action.payload;
    },

but without effect

Any help or direction is greatly appreciated. Thanks

smsoousaa year ago

Any help? It's the second POST I've sent to the forum and I haven't even received a response.

Track-tracea year ago

Hi,

I have no clue but if you select Replay from the popup, then from that route when you click on the blue dot, and then click that gps icon again, then you will get the popup window. So you might look at that code how it is done.

smsoousaa year ago

Thank you for this direction, but unfortunately this snippet does not solve my problem, what I want is to be able to select the device without having to activate the popup, this interferes a lot when we want to view the real-time route of a device on the map, and when I I close the popup, it loses the device selection.

Cristiana year ago

smsoousa, StatusCard displays the popup and the condition for that is selectedDeviceId, either if you select the device from the device list or from the map. This is in MainPage.js, in my opinion it is there where you must condition that StatusCard is not shown when selecting the device from the list, but that if it shows it when selecting from the map.

      <EventsDrawer open={eventsOpen} onClose={() => setEventsOpen(false)} />
      {selectedDeviceId && (
        <StatusCard
          deviceId={selectedDeviceId}
          position={selectedPosition}
          onClose={() => dispatch(devicesActions.selectId(null))}
          desktopPadding={theme.dimensions.drawerWidthDesktop}
        />
      )}
smsoousaa year ago

Thanks for the direction @Cristian, I tried a few ways, I even managed to select the device without opening the popup, however, it was a global rule, when activating the device on the map, it just selected and did not open the popup.