Skip to content

Commit

Permalink
Pages: Trash view should default to table layout. (WordPress#63138)
Browse files Browse the repository at this point in the history
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
  • Loading branch information
4 people authored Jul 12, 2024
1 parent d6eecb9 commit 905b41d
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 @@ -166,6 +166,7 @@ export function useDefaultViews( { postType } ) {
icon: trash,
view: {
...DEFAULT_POST_BASE,
type: LAYOUT_TABLE,
filters: [
{
field: 'status',
Expand Down

0 comments on commit 905b41d

Please sign in to comment.