How to get the custom renderer button click callback function in JSONForms react

Hi I am trying to render the text field with icon. It’s successfully rendered in UI but I am not able to get the callback function for that icon click. Below is my custom renderer code

const HelperTextMisaligned = ({ label, onButtonClick }: any) => {
const handleClick = () => {
// Call the onButtonClick function and pass the value (e.g., label) when the button is clicked
onButtonClick(label);
};
return (
<Box
sx={{
display: ‘flex’,
alignItems: ‘center’
}}
>

search

);
}

export default withJsonFormsControlProps(HelperTextMisaligned);

const modelSchema = {
type: ‘object’,
properties: {
customButtonField: {
type: ‘string’
},
materialTextField: {
type: ‘string’
}
}
};
const uiSchema = {
type: ‘VerticalLayout’,
elements: [
{
type: ‘Control’,
label: ‘Custom Button Field’,
scope: ‘#/properties/customButtonField’
},
{
type: ‘Control’,
label: ‘Material Text Field’,
scope: ‘#/properties/materialTextField’
}
]
}

const renderers = [
…materialRenderers,
//register custom renderers
{ tester: RegisterCustomRenderers, renderer: CustomButtonRenderer },
];

could anyone please help me into this to get the icon click event in jsonforms

Hi @Navaneeth,

What exactly are you struggling with? Did you bind the handleClick / onButtonClick somewhere in the code?