PluginProbe
Tableberg – Simple Gutenberg Table Block / 1.1.5
Tableberg – Simple Gutenberg Table Block v1.1.5
1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 trunk 0.0.2 0.2.1 0.3.2 0.3.3 0.4.1 0.5.0 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 All 42 releases
tableberg / src / ribbon-extensions.tsx

ribbon-extensions.tsx in Tableberg – Simple Gutenberg Table Block 1.1.5, at src/ribbon-extensions.tsx

23 lines 685 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { ReactNode } from "react";
2 import { applyFilters } from "@wordpress/hooks";
3
4 import { CellKey, RibbonConfig } from "./attributes";
5
6 /**
7 * The ribbon is a pro feature. The cell block receives it as a prop from
8 * pro's block extension, but the read-only preview (sort / search /
9 * responsive) renders cells from a store snapshot rather than from block
10 * props, so it asks for the ribbon through this filter instead.
11 */
12 export function renderExtendedCellRibbon(
13 ribbon: RibbonConfig,
14 cellCoords: CellKey
15 ): ReactNode | null {
16 return applyFilters(
17 "tableberg.renderCellRibbon",
18 null,
19 ribbon,
20 cellCoords
21 ) as ReactNode | null;
22 }
23