mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-07 05:04:58 -05:00
Add placeholder parameter to updateTextInput (#1742)
* add placeholder parameter * add js placeholder code * roxygenize * grunt * fix updateCheckBoxInput not to use placeholder * simply roxygen * add NEWS * revert grunt
This commit is contained in:
@@ -30,12 +30,16 @@ $.extend(textInputBinding, {
|
||||
if (data.hasOwnProperty('label'))
|
||||
$(el).parent().find('label[for="' + $escape(el.id) + '"]').text(data.label);
|
||||
|
||||
if (data.hasOwnProperty('placeholder'))
|
||||
el.placeholder = data.placeholder;
|
||||
|
||||
$(el).trigger('change');
|
||||
},
|
||||
getState: function(el) {
|
||||
return {
|
||||
label: $(el).parent().find('label[for="' + $escape(el.id) + '"]').text(),
|
||||
value: el.value
|
||||
value: el.value,
|
||||
placeholder: el.placeholder
|
||||
};
|
||||
},
|
||||
getRatePolicy: function() {
|
||||
|
||||
Reference in New Issue
Block a user