Changes to datagrid

This commit is contained in:
Jeremy Rangel
2025-02-01 22:16:55 -08:00
parent 05664f161a
commit 6dd4e7e1e2
7 changed files with 73 additions and 36 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '81e2f5a896da526cb195');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '6c47b2075da54fd439aa');

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,10 @@
"type": "number",
"default": 1
},
"dataTypes" :{
"type": "object",
"default" :{}
},
"gridColumnDefinitions": {
"type": "array",
"default": [

View File

@ -64,12 +64,12 @@ export default function Edit({ attributes, setAttributes }) {
help={__('Select the logic for setting the colors', 'lcp')}
value={hierarchicalSource || 'parent'}
options={[
{ label: 'Parent Column', value: 'parent' },
{ label: 'Column Order', value: 'columnOrder' }
{ label: 'Color Column', value: 'colorColumn' },
{ label: 'Swatch', value: 'swatch' }
]}
onChange={(value) => setAttributes({ hierarchicalSource: value })}
/>
{hierarchicalSource === 'columnOrder' && (
{hierarchicalSource === 'swatch' && (
<TextControl
label={__('Hierarchical Column Order', 'lcp')}
value={hierarchicalColumnOrder}