Skip to content

Commit

Permalink
DataViews: hide actions menu upon selecting a layout (#57418)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal authored Dec 28, 2023
1 parent 3f6c738 commit ec2c51d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dataviews/src/dropdown-menu-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const radioCheck = (
*/
export const DropdownMenuRadioItemCustom = forwardRef(
function DropdownMenuRadioItemCustom(
{ checked, name, value, onChange, onClick, ...props },
{ checked, name, value, hideOnClick, onChange, onClick, ...props },
ref
) {
const onClickHandler = ( e ) => {
Expand All @@ -42,7 +42,7 @@ export const DropdownMenuRadioItemCustom = forwardRef(
role="menuitemradio"
name={ name }
aria-checked={ checked }
hideOnClick={ false }
hideOnClick={ !! hideOnClick }
prefix={
checked ? (
<Icon icon={ radioCheck } />
Expand Down
1 change: 1 addition & 0 deletions packages/dataviews/src/view-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function ViewTypeMenu( { view, onChangeView, supportedLayouts } ) {
value={ availableView.type }
name="view-actions-available-view"
checked={ availableView.type === view.type }
hideOnClick={ true }
onChange={ ( e ) => {
onChangeView( {
...view,
Expand Down

0 comments on commit ec2c51d

Please sign in to comment.