Table block variation with header section activated
-
Hi,
I am attempting to create a default table variation with the header section toggled on. There is no boolean attribute to activate the header section it seems and instead it’s an array.
I was able to add the header section with the below code but it then doesn’t activate the ‘create table wizard'(where user chooses amount of columns/rows before table is generated) and it also breaks the “insert row” function unless I also add the attribute
body": [{"cells": [...wp.blocks.registerBlockVariation('core/table', { name: 'my-table', title: 'Table', attributes: { className: 'is-style-regular', head: [ { cells: [ { tag: "th" } ] } ], }, isDefault: true, });If block variation can’t toggle the header section without losing the wizard and insert row functionality then is there another way of doing it?
The topic ‘Table block variation with header section activated’ is closed to new replies.