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:
Carl Ganz
2017-06-15 20:00:39 -07:00
committed by Winston Chang
parent 3817370d4e
commit 8b5d12b958
5 changed files with 23 additions and 7 deletions

View File

@@ -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() {