clear button option for "text" component

It would be nice if DHTMLX Touch had the option to activate a clear button to remove any input that was keyed into the text component.

-Thanks, Kris

The button can be added using the following approach:

  1. iconWidth and iconCss property for the “text” to define the width of the div with an icon and its css rule:

{ view:“text”, iconWidth: 20, iconCss: “close_button”, id:‘text1’,…},

  1. define “close_button” style. for example like so:
.close_button{ height: 30px; background: ...; float:left; }
  1. add event listener to the item that will clear input field if the icon is clicked:

[code]{ view:“text”, iconWidth: 20, iconCss: “close_button”, id:‘text1’, click: “checkCloseClick”},

function checkCloseClick(id,e){
var isCloseButton = ((||e.srcElement).className == “close_button”)