Skip to content

Commit

Permalink
Pages: Trash view should default to table layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jul 4, 2024
1 parent f90a132 commit 2643f4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function DataViewItem( {
suffix,
} ) {
const {
params: { postType, layout },
params: { postType, layout, activeView: previousView },
} = useLocation();

const iconToUse =
Expand All @@ -41,7 +41,7 @@ export default function DataViewItem( {
}
const linkInfo = useLink( {
postType,
layout,
layout: type !== 'list' || previousView === 'trash' ? type : layout,
activeView,
isCustom: isCustom ? 'true' : undefined,
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export function useDefaultViews( { postType } ) {
icon: trash,
view: {
...DEFAULT_POST_BASE,
type: LAYOUT_TABLE,
filters: [
{
field: 'status',
Expand Down

0 comments on commit 2643f4b

Please sign in to comment.