[JSON Pretty Format Reactive] Feature request: clear on empty input
Forge component by Pedro Domingues
Application Type
Reactive

Hi,

Is it possible to clear the widget when the 'originalJSON' input parameter is emtpy?
I do have some action which may lead to an exception; and I want the JSON viewer to be cleared in such cases by setting originalJSON = "".

Would be a nice improvement. Thanks in advance.

Rob.

Hi Rob,

Thanks a lot for your feedback!! I have uploaded a new version with that improvement!

You can now update the component!

Please, mark my answer as the solution, in order to close this topic.

Have a great week!

Cheers,

Pedro Domingues

Solution

Hi Rob Poels,

 In OnParametersChanged action check whether the originalJSON = "" . If it is empty then add the js

document.getElementById('json-renderer-'+$parameters.WrapperId).innerHTML=""

Here i have attached the URL and oml here.

Hope this helps!

Regards,

Ellakkiya.S

JSONPrettyFormatReactive.oml

Hi Rob,

Thanks a lot for your feedback!! I have uploaded a new version with that improvement!

You can now update the component!

Please, mark my answer as the solution, in order to close this topic.

Have a great week!

Cheers,

Pedro Domingues

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.