# WordPress Gutenberg InspectorControls giving Warning when creating Attributes with nested Elements

**URL:** <https://forum.pinegrow.com/t/wordpress-gutenberg-inspectorcontrols-giving-warning-when-creating-attributes-with-nested-elements/7715>\
**Category:** Bug Reports\
**Tags:** wordpress, gutenberg\
**Created:** [February 4, 2023, 3:03pm UTC](https://forum.pinegrow.com/t/wordpress-gutenberg-inspectorcontrols-giving-warning-when-creating-attributes-with-nested-elements/7715 "2023-02-04T15:03:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsmeleo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/itsmeleo/32/19_2.png) [@itsmeleo](https://forum.pinegrow.com/u/itsmeleo)\
**Post date:** [February 4, 2023, 3:03pm UTC](https://forum.pinegrow.com/t/wordpress-gutenberg-inspectorcontrols-giving-warning-when-creating-attributes-with-nested-elements/7715/1 "2023-02-04T15:03:25Z")

</div>

Hello Support,  
I have created a small block using Pinegrow Gutenberg Block and Block Attributes, Pinegrow using InspectorControls blockEditor’s Component, now the issue is that each element you insert inside Inspector Control array, it must have a unique key “KEY”  
see the following code where I have added the key manually.

```auto
edit: function (props) {
			return el(Fragment, {}, [
				el(InspectorControls, { key: "inspector" }, [
					el(
						Panel,
						{ key: "panel" },
						el(
							PanelBody,
							{
								title: __("Block Attributes", "pwspkblocks"),
							},
							[
								el(TextControl, {
									key: "text1",
									value: props.attributes.message,
									label: __("Change Message", "pwspkblocks"),
									onChange: function (text) {
										props.setAttributes({ message: text });
									},
								}),
							]
						)
					),
				]),
				el(
					"p",
					{ ...useBlockProps(), key: "paragraph" },
					props.attributes.message
				),
			]);
		},

```

Pinegrow does not create a unique key for each element, and the console warns about it.  
if you have any question or doubt about my post let me know.

Thanks

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [February 5, 2023, 12:04am UTC](https://forum.pinegrow.com/t/wordpress-gutenberg-inspectorcontrols-giving-warning-when-creating-attributes-with-nested-elements/7715/2 "2023-02-05T00:04:06Z")

</div>

Thanks @itsmeleo will take a look at this.
