mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +00:00
Set attributes in input form controls (#1805)
* 🔨 add autocapitalize, autocomplete, autocorrect and spellcheck attributes * 🔨 switch autocapitalize to none * 🔨 add attributes to dev-state * 🔨 add attributes to entity-picker
This commit is contained in:
parent
d97e356376
commit
028003dffc
@ -38,7 +38,16 @@ class HaEntityPicker extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
||||
allow-custom-value="[[allowCustomEntity]]"
|
||||
on-change='_fireChanged'
|
||||
>
|
||||
<paper-input autofocus="[[autofocus]]" label="[[_computeLabel(label, localize)]]" class="input" value="[[value]]" disabled="[[disabled]]">
|
||||
<paper-input
|
||||
autofocus="[[autofocus]]"
|
||||
label="[[_computeLabel(label, localize)]]"
|
||||
class="input"
|
||||
autocapitalize='none'
|
||||
autocomplete='off'
|
||||
autocorrect='off'
|
||||
spellcheck='false'
|
||||
value="[[value]]"
|
||||
disabled="[[disabled]]">
|
||||
<paper-icon-button slot="suffix" class="clear-button" icon="hass:close" no-ripple="" hidden$="[[!value]]">Clear</paper-icon-button>
|
||||
<paper-icon-button slot="suffix" class="toggle-button" icon="[[_computeToggleIcon(opened)]]" hidden="[[!_states.length]]">Toggle</paper-icon-button>
|
||||
</paper-input>
|
||||
|
@ -120,6 +120,10 @@ class HaPanelDevService extends PolymerElement {
|
||||
always-float-label
|
||||
label='Service Data (JSON, optional)'
|
||||
value='{{serviceData}}'
|
||||
autocapitalize='none'
|
||||
autocomplete='off'
|
||||
autocorrect='off'
|
||||
spellcheck='false'
|
||||
></paper-textarea>
|
||||
<paper-button
|
||||
on-click='_callService'
|
||||
|
@ -91,10 +91,20 @@ class HaPanelDevState extends EventsMixin(PolymerElement) {
|
||||
<paper-input
|
||||
label="State"
|
||||
required
|
||||
autocapitalize='none'
|
||||
autocomplete='off'
|
||||
autocorrect='off'
|
||||
spellcheck='false'
|
||||
value='{{_state}}'
|
||||
class='state-input'
|
||||
></paper-input>
|
||||
<paper-textarea label="State attributes (JSON, optional)" value='{{_stateAttributes}}'></paper-textarea>
|
||||
<paper-textarea
|
||||
label="State attributes (JSON, optional)"
|
||||
autocapitalize='none'
|
||||
autocomplete='off'
|
||||
autocorrect='off'
|
||||
spellcheck='false'
|
||||
value='{{_stateAttributes}}'></paper-textarea>
|
||||
<paper-button on-click='handleSetState' raised>Set State</paper-button>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user