-
Notifications
You must be signed in to change notification settings - Fork 2.4k
.textinput('refresh') #5708
Comments
Thanks for submitting the issue. All widgets should have a refresh method so I agree we have to add this for textinput. |
@JorisDebonnet http://jsfiddle.net/johnchacko/w83pZ/1/ submitted a pull request |
True, but there was some reason I didn't want to use change - probably because I had another event handler on that, which would have caused an unnecessary ajax request or something. So in the absense of the refresh method, my current workaround is triggering keyup on the element instead. |
@JorisDebonnet , ur right... |
Slightly related: the clear button should be hidden again after form reset. See @weisborg his comment here #1834 (comment) |
Which probably only means that the fields should be 'refreshed' after form reset -- since a clear button might actually remain if the textfield's default value is not empty. |
In most cases that will be sufficient. However, in general the refresh method provides the possibility to set all options on the fly. For example: if someone uses a form validator and wants to programmatically change the theme to highlight an input, that should be possible with refresh |
Will be also good to re-run autogrow code for |
reference to issue jquery-archive#5708 and previous pull request. jquery-archive#5766 added 'refresh' method to textinput. added a _private method '_refresh' and called same from create and refresh. demo test page :http://jsbin.com/edidil/7/ [Got various combinations of input fields and button to refresh input.] demo test page : http://johnchacko.net/samples/textinputs.html
Closing as fixed on master. To set an option like |
Could you add a refresh method for text inputs, so that the new clear button (
data-clear-btn="true"
) can be redetermined when the value changes outside of the input's own control?See my example: http://jsfiddle.net/w83pZ/
The text was updated successfully, but these errors were encountered: