Skip to content

Commit

Permalink
revert: focusOnMount prop should use firstContentElement
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Mar 4, 2025
1 parent a77319c commit 78ad11a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function ActionModal< Item >( {
title={ action.modalHeader || label }
__experimentalHideHeader={ !! action.hideModalHeader }
onRequestClose={ closeModal }
focusOnMount={ action.modalFocusOnMount }
focusOnMount="firstContentElement"
size={ action.modalSize || 'medium' }
overlayClassName={ `dataviews-action-modal dataviews-action-modal__${ kebabCase(
action.id
Expand Down
12 changes: 0 additions & 12 deletions packages/dataviews/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
*/
import type { ReactElement, ComponentType } from 'react';

/**
* WordPress dependencies
*/
import type { useFocusOnMount } from '@wordpress/compose';

/**
* Internal dependencies
*/
Expand Down Expand Up @@ -473,13 +468,6 @@ export interface ActionModal< Item > extends ActionBase< Item > {
* The size of the modal.
*/
modalSize?: 'small' | 'medium' | 'large' | 'fill';

/**
* The focus on mount of the modal.
*/
modalFocusOnMount?:
| Parameters< typeof useFocusOnMount >[ 0 ]
| 'firstContentElement';
}

export interface ActionButton< Item > extends ActionBase< Item > {
Expand Down

0 comments on commit 78ad11a

Please sign in to comment.