# Pass options(Enum) to custom renderer

**URL:** <https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151>\
**Category:** General\
**Created:** [August 17, 2020, 5:41am UTC](https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151 "2020-08-17T05:41:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [August 17, 2020, 5:41am UTC](https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151/1 "2020-08-17T05:41:33Z")

</div>

I am creating a custom renderer for an Array and it has enum. I am following the rating control code to create new custom renderer. I want to pass options(Enum) to custom renderer. But no such option in the rating control example. How can we implement this?

_[[original thread](https://spectrum.chat/jsonforms/general/pass-optionsenum-to-custom-renderer~eb75962c-9393-41c9-9057-da1370472716) by Nanda]_

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [August 17, 2020, 6:58am UTC](https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151/2 "2020-08-17T06:58:33Z")

</div>

_[Nanda]_

Sorry. I am the beginner for this. finally I found the solution for this ```const MultiSelectControl = (props: ControlProps & OwnPropsOfEnum) =\> {  
return (  
\<MultiSelect  
value={props.data}  
options={props.options}  
handleChange={(ev: any) =\> props.handleChange(props.path, ev)}  
/\>  
);  
};

export default withJsonFormsEnumProps(MultiSelectControl);```

---

<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:** [August 17, 2020, 2:05pm UTC](https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151/3 "2020-08-17T14:05:18Z")

</div>

No problem! Yes `withJsonFormsEnumProps` is the way to go when you want to reuse the existing enum mapping. In case you want to customize it you can also write your own `withXZY` HOC in which you can also reuse `withJsonFormsEnumProps` or `withJsonFormsControlProps`.

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [August 19, 2020, 4:43am UTC](https://jsonforms.discourse.group/t/pass-options-enum-to-custom-renderer/151/4 "2020-08-19T04:43:39Z")

</div>

_[Nanda]_

Thanks @sdirix
