Skip to content

Commit

Permalink
DataViews: Fix applied default layout props (#58400)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Jan 29, 2024
1 parent 94fbb4e commit 0395847
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ export default function PageTemplatesTemplateParts( { postType } ) {
const { params } = useLocation();
const { activeView = 'all', layout } = params;
const defaultView = useMemo( () => {
const usedType = window?.__experimentalAdminViews
? layout ?? DEFAULT_VIEW.type
: DEFAULT_VIEW.type;
return {
...DEFAULT_VIEW,
type: window?.__experimentalAdminViews
? layout ?? DEFAULT_VIEW.type
: DEFAULT_VIEW.type,
type: usedType,
layout: defaultConfigPerViewType[ usedType ],
filters:
activeView !== 'all'
? [
Expand Down

0 comments on commit 0395847

Please sign in to comment.