(window["webpackJsonpstreamlit-browser"]=window["webpackJsonpstreamlit-browser"]||[]).push([[43],{2219:function(e,t,n){"use strict";n.r(t);var r=n(5),a=n(10),s=n(13),i=n(11),o=n(12),l=n(0),u=n.n(l),p=n(1173),d=n(19),c=function(e){function t(){var e,n;Object(r.a)(this,t);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return(n=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={dirty:!1,value:n.props.element.get("default")},n.setWidgetValue=function(e){var t=n.props.element.get("id");n.props.widgetMgr.setStringValue(t,n.state.value,e),n.setState({dirty:!1})},n.onBlur=function(){n.state.dirty&&n.setWidgetValue({fromUi:!0})},n.onChange=function(e){n.setState({dirty:!0,value:e.target.value})},n.onKeyPress=function(e){"Enter"===e.key&&n.state.dirty&&n.setWidgetValue({fromUi:!0})},n.render=function(){var e=n.props.element.get("label"),t={width:n.props.width};return u.a.createElement("div",{className:"Widget row-widget stTextInput",style:t},u.a.createElement("label",null,e),u.a.createElement(p.Input,{value:n.state.value,onBlur:n.onBlur,onChange:n.onChange,onKeyPress:n.onKeyPress,disabled:n.props.disabled,type:n.getTypeString()}),n.state.dirty?u.a.createElement("div",{className:"instructions"},"Press Enter to apply"):null)},n}return Object(o.a)(t,e),Object(a.a)(t,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}},{key:"getTypeString",value:function(){return this.props.element.get("type")===d.l.Type.PASSWORD?"password":void 0}}]),t}(u.a.PureComponent);n.d(t,"default",function(){return c})}}]);
//# sourceMappingURL=43.6830ca95.chunk.js.map