Skip to content

Commit

Permalink
Table Block: Add dropdown menu props to ToolsPanel component
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhendu2002 committed Dec 16, 2024
1 parent 2d7f2d8 commit 3e2a855
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
isEmptyTableSection,
} from './state';
import { Caption } from '../utils/caption';
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

const ALIGNMENT_CONTROLS = [
{
Expand Down Expand Up @@ -108,6 +109,7 @@ function TableEdit( {

const tableRef = useRef();
const [ hasTableCreated, setHasTableCreated ] = useState( false );
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

/**
* Updates the initial column count used for table creation.
Expand Down Expand Up @@ -483,6 +485,7 @@ function TableEdit( {
foot: [],
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
hasValue={ () => hasFixedLayout !== true }
Expand Down

0 comments on commit 3e2a855

Please sign in to comment.