# Enable or disable ui text control with out clearing value?

**URL:** https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176
**Category:** Dashboard
**Created:** [19 November 2020 05:17 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176 "2020-11-19T05:17:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [19 November 2020 05:17 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/1 "2020-11-19T05:17:52Z")

</div>

Enable or disable ui text control with out clearing value? Typically you delete payload from a message such that message is just msg.enabled true or false. But this has the side effect of clearing the ui-text value as well. Is there a trick to avoid this?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [19 November 2020 07:24 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/2 "2020-11-19T07:24:04Z")

</div>

Yes. Don't delete the payload 🙂

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [19 November 2020 10:36 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/3 "2020-11-19T10:36:54Z")

</div>

The current behaviour of the Text Display node does appear to be inconsistent with that of the Text Input node. Disabling the Text Input node with no msg.payload leaves the displayed value as is rather than clearing it.

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [19 November 2020 20:32 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/4 "2020-11-19T20:32:47Z")

</div>

Exactly! 🙂 In fact most of the default UI nodes I have used so far, you can enable or disable without payload, and the current content is left unchanged. Any plans to standardize the behavior? I often disable an object... to show feedback that an update in progress. It gives the operator a clean indicator that the state or data of the ui object is stale. And since not all ui objects support a default message (like charts do), the disable while updating then enable is applicable. It would be nice, as well, if every ui object had a 'blank' feature supported to give operator a clear indication of pending update (of ui object content).

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [19 November 2020 22:45 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/5 "2020-11-19T22:45:48Z")

</div>

hmm yeah something slight odd going on.. if you change it to be {{value}} it behaves as you expected... will investigate

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [21 November 2020 04:29 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/6 "2020-11-21T04:29:48Z")

</div>

Oh! Cool, looking forward to what you find.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 December 2020 04:30 UTC](https://discourse.nodered.org/t/enable-or-disable-ui-text-control-with-out-clearing-value/36176/7 "2020-12-21T04:30:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
