@@ -34,11 +34,8 @@ const Textarea = ({
3434 tabIndex,
3535 tabindex,
3636 n_blur = 0 ,
37- n_blur_timestamp = - 1 ,
3837 n_submit = 0 ,
39- n_submit_timestamp = - 1 ,
4038 n_clicks = 0 ,
41- n_clicks_timestamp = - 1 ,
4239 debounce = false ,
4340 value = '' ,
4441 submit_on_enter = true ,
@@ -71,10 +68,7 @@ const Textarea = ({
7168
7269 const onBlur = e => {
7370 if ( setProps ) {
74- const payload = {
75- n_blur : n_blur + 1 ,
76- n_blur_timestamp : Date . now ( )
77- } ;
71+ const payload = { n_blur : n_blur + 1 } ;
7872 if ( debounce === true ) {
7973 payload . value = e . target . value ;
8074 }
@@ -85,10 +79,7 @@ const Textarea = ({
8579 const onKeyUp = e => {
8680 if ( submit_on_enter && setProps && e . key === 'Enter' && ! e . shiftKey ) {
8781 e . preventDefault ( ) ; // don't create newline if submitting
88- const payload = {
89- n_submit : n_submit + 1 ,
90- n_submit_timestamp : Date . now ( )
91- } ;
82+ const payload = { n_submit : n_submit + 1 } ;
9283 if ( debounce === true ) {
9384 payload . value = e . target . value ;
9485 }
@@ -98,10 +89,7 @@ const Textarea = ({
9889
9990 const onClick = ( ) => {
10091 if ( setProps ) {
101- setProps ( {
102- n_clicks : n_clicks + 1 ,
103- n_clicks_timestamp : Date . now ( )
104- } ) ;
92+ setProps ( { n_clicks : n_clicks + 1 } ) ;
10593 }
10694 } ;
10795
@@ -131,13 +119,7 @@ const Textarea = ({
131119 spellCheck = { spellcheck || spellCheck }
132120 tabIndex = { tabindex || tabIndex }
133121 { ...omit (
134- [
135- 'n_blur_timestamp' ,
136- 'n_submit_timestamp' ,
137- 'persistence' ,
138- 'persistence_type' ,
139- 'persisted_props'
140- ] ,
122+ [ 'persistence' , 'persistence_type' , 'persisted_props' ] ,
141123 otherProps
142124 ) }
143125 data-dash-is-loading = {
@@ -410,10 +392,6 @@ Textarea.propTypes = {
410392 * Number of times the input lost focus.
411393 */
412394 n_blur : PropTypes . number ,
413- /**
414- * Last time the input lost focus.
415- */
416- n_blur_timestamp : PropTypes . number ,
417395
418396 /**
419397 * Number of times the `Enter` key was pressed while the textarea had focus. Only
@@ -422,13 +400,8 @@ Textarea.propTypes = {
422400 n_submit : PropTypes . number ,
423401
424402 /**
425- * Last time that `Enter` was pressed. Only updates if submit_on_enter is True.
426- */
427- n_submit_timestamp : PropTypes . number ,
428-
429- /**
430- * Whether or not the form should increment the n_submit and n_submit_timestamp props
431- * when enter key is pressed. If True, use shift + enter to create a newline. Default: True
403+ * Whether or not the form should increment the n_submit prop when enter key is
404+ * pressed. If True, use shift + enter to create a newline. Default: True
432405 */
433406 submit_on_enter : PropTypes . bool ,
434407
@@ -438,13 +411,6 @@ Textarea.propTypes = {
438411 */
439412 n_clicks : PropTypes . number ,
440413
441- /**
442- * An integer that represents the time (in ms since 1970)
443- * at which n_clicks changed. This can be used to tell
444- * which button was changed most recently.
445- */
446- n_clicks_timestamp : PropTypes . number ,
447-
448414 /**
449415 * If true, changes to input will be sent back to the Dash server only on enter or
450416 * when losing focus. If it's false, it will sent the value back on every change.
0 commit comments