# Customise ExpandPanelRenderer label

**URL:** <https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842>\
**Category:** General\
**Created:** [November 27, 2023, 6:18pm UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842 "2023-11-27T18:18:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonmellows](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/simonmellows/32/860_2.png) [@simonmellows](https://jsonforms.discourse.group/u/simonmellows)\
**Post date:** [November 27, 2023, 6:18pm UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842/1 "2023-11-27T18:18:23Z")

</div>

How can I customise the label content of the ExpandPanelRenderer component? I have an additional property `Id` which I’d also like to display in this area. I’ve tried altering the `childLabelProp` inside the `MaterialArrayLayout` component but any value I pass that isn’t `appliedUiSchemaOptions.elementLabelProp` just renders no text…

 ![image](https://global.discourse-cdn.com/free1/uploads/jsonforms/original/1X/cf741dcb7279b4d12db7e8041be8bb2b64625f40.png)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [November 28, 2023, 2:55pm UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842/2 "2023-11-28T14:55:19Z")

</div>

Hi @simonmellows,

I don’t fully understand what the problem is.

Do you mean you want to show the `Id` additionally or are you trying to set the `Id` as the property to show for the renderer?

Can you provide the example `schema` and `uischema` you are using. If you are using a custom renderer, what exactly did you try? Can you post the full code?

---

<div class="post-metadata">

**Author:** ![simonmellows](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/simonmellows/32/860_2.png) [@simonmellows](https://jsonforms.discourse.group/u/simonmellows)\
**Post date:** [November 28, 2023, 5:48pm UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842/3 "2023-11-28T17:48:47Z")

</div>

I wanted to display more than one bit of data within that label - I have found a workaround by customising the `MaterialArrayLayout` component to allow for this.

However, I am having another issue. In the image below, why does the `removeItems` prop trigger when items are added to the array as well as removed. And how do I access the last item that was removed? I can’t seem to find a way of overwriting the `removeItems()` function as I want to perform a load of custom functionality when an item is removed. For example, I read somewhere that the delete dialog is not available for the `MaterialArrayLayout` so I wanted to add a dialog to prompt the user when pressing delete. Any guidance would be greatly appreciated.

![image](https://global.discourse-cdn.com/free1/uploads/jsonforms/original/1X/6b38bfec451ebaadf1a75c960a08aa196ecff51b.png)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [November 29, 2023, 8:44am UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842/4 "2023-11-29T08:44:59Z")

</div>

Hi @simonmellows,

This `console.log` is executed whenever the component rendering the `MaterialArrayLayout` is rerendered. The result of `console.log` is `undefined` and that is then handed over to the `MaterialArrayLayout`, i.e. `removeItems` is set to `undefined`.

---

<div class="post-metadata">

**Author:** ![simonmellows](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/simonmellows/32/860_2.png) [@simonmellows](https://jsonforms.discourse.group/u/simonmellows)\
**Post date:** [November 29, 2023, 9:09am UTC](https://jsonforms.discourse.group/t/customise-expandpanelrenderer-label/1842/5 "2023-11-29T09:09:29Z")

</div>

Thank you for the response, Stefan.

Okay so what would be the best way for me to intercept the `removeItems` function so that I can add a custom dialog and access the last array item that the user requested to remove?
