Skip to content

Commit

Permalink
fix: show spinner while element ID is not retrieved (#1390)
Browse files Browse the repository at this point in the history
  • Loading branch information
eglitise authored Mar 14, 2024
1 parent 4ea7dfc commit 1b2d3d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/renderer/components/Inspector/SelectedElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ const SelectedElement = (props) => {
value,
name: key,
}));
dataSource.unshift({key: 'elementId', value: selectedElementId, name: 'elementId'});
dataSource.unshift({
key: 'elementId',
value: selectedElementSearchInProgress ? <Spin /> : selectedElementId,
name: 'elementId',
});

// Get the columns for the strategies table
let findColumns = [
Expand Down
1 change: 1 addition & 0 deletions app/renderer/reducers/Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export default function inspector(state = INITIAL_STATE, action) {
...state,
selectedElement: action.selectedElement,
selectedElementPath: action.selectedElement.path,
selectedElementId: null,
selectedElementSearchInProgress: true,
elementInteractionsNotAvailable: false,
findElementsExecutionTimes: [],
Expand Down

0 comments on commit 1b2d3d9

Please sign in to comment.