Skip to content

Commit

Permalink
Add page tab suggestions/improvements (#2342)
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira authored Jul 21, 2023
1 parent 6eea96d commit 35a810b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function ComponentPanel({ className }: ComponentPanelProps) {
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<TabList onChange={handleChange} aria-label="Component options">
<Tab label="Page" value="page" />
<Tab label="Component" value="component" />
<Tab label="Component" value="component" disabled={!selectedNode} />
<Tab label="Theme" value="theme" />
</TabList>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion packages/toolpad-app/src/toolpad/AppState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export function appStateReducer(state: AppState, action: AppStateAction): AppSta
case 'DESELECT_NODE': {
if (state.currentView.kind === 'page') {
return update(state, {
currentView: { ...state.currentView, selectedNodeId: null },
currentView: { ...state.currentView, selectedNodeId: null, tab: 'page' },
});
}
return state;
Expand Down

0 comments on commit 35a810b

Please sign in to comment.