# How to remove the data when hide

**URL:** <https://jsonforms.discourse.group/t/how-to-remove-the-data-when-hide/97>\
**Category:** General\
**Created:** [September 2, 2020, 10:27am UTC](https://jsonforms.discourse.group/t/how-to-remove-the-data-when-hide/97 "2020-09-02T10:27:12Z")\
**Posts on this page:** 3\
**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:** [September 2, 2020, 10:27am UTC](https://jsonforms.discourse.group/t/how-to-remove-the-data-when-hide/97/1 "2020-09-02T10:27:12Z")

</div>

Hi, the Rules are working fine on the UI side. I am hiding one category based on some rules. But the data is not removing. How can I remove those data associated with the hidden controls?

_[[original thread](https://spectrum.chat/jsonforms/general/how-to-remove-the-data-when-hide~8893fdd6-31cc-4d3c-b641-b9fdda4a7260) by Nanda]_

---

<div class="post-metadata">

**Author:** ![eneufeld](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/eneufeld/32/10_2.png) [@eneufeld](https://jsonforms.discourse.group/u/eneufeld)\
**Post date:** [September 2, 2020, 11:40am UTC](https://jsonforms.discourse.group/t/how-to-remove-the-data-when-hide/97/2 "2020-09-02T11:40:13Z")

</div>

Hi @nandhu(nandhu) , unfortunately you can’t listen to rule triggers or changes of the ui schema at the moment. So in order to achieve what you want, you need to listen to data changes of the data model and change the data model manually if needed.

---

<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:** [September 2, 2020, 1:23pm UTC](https://jsonforms.discourse.group/t/how-to-remove-the-data-when-hide/97/3 "2020-09-02T13:23:10Z")

</div>

_[Nanda]_

Thanks @eneufeld
