Skip to content

Dashboard Navigation Inconsistency #285

@OmMakwana221

Description

@OmMakwana221

ThingsBoard Platform Version:
ThingsBoard PE Cloud 4.2.1

ThingsBoard PE App Version:
1.7.0

Description:
There is an issue with dashboard navigation in the ThingsBoard PE mobile app. When navigating through multiple states, the back navigation does not behave as expected, causing excessive and confusing navigation for the user.

Steps to Reproduce:

  1. Navigate through multiple dashboard states sequentially, e.g., 1 → 2 → 3 → 4.
  2. Navigate back to previous states in a non-linear order, e.g., 4 → 2, then 2 → 3.
  3. Press the back button.

Observed Behavior:

  • 3 → 2
  • 2 → 4
  • 4 → 3 → 2 → 1

This results in the user having to perform multiple unnecessary navigations to reach the intended state.

Video:

screen-20251216-180408.mp4

I tested using a custom action to set the source and target state, but it did not work as expected.

Image

here full script I tried:
If you have any working script, I would be grateful if you could share it with me

var sc = widgetContext.stateController;

var firstStateId = 'home';
var targetStateId = 'device_trends';

var entityId =
    widgetContext.datasources &&
    widgetContext.datasources[0] &&
    widgetContext.datasources[0].entity &&
    widgetContext.datasources[0].entity.id;

var currentState = sc.getStateId();

if (currentState !== targetStateId) {

    if (currentState !== firstStateId) {
        sc.updateState(firstStateId, {}, false);
    }

    sc.updateState(
        targetStateId,
        entityId ? { entityId: entityId } : {},
        true
    );
}

Looking for a workaround or a proper fix to handle dashboard state navigation more effectively in the mobile app.

This issue significantly affects user experience during multi-state navigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions