diff --git a/src/components/inputswitch/InputSwitch.vue b/src/components/inputswitch/InputSwitch.vue
index e8db100b1..0cd798e4c 100644
--- a/src/components/inputswitch/InputSwitch.vue
+++ b/src/components/inputswitch/InputSwitch.vue
@@ -34,7 +34,7 @@ export default {
this.focused = true;
this.$emit('focus', event);
},
- onBlur() {
+ onBlur(event) {
this.focused = false;
this.$emit('blur', event);
}
diff --git a/src/views/inputswitch/InputSwitchDemo.vue b/src/views/inputswitch/InputSwitchDemo.vue
index bfc52e444..872cb7123 100644
--- a/src/views/inputswitch/InputSwitchDemo.vue
+++ b/src/views/inputswitch/InputSwitchDemo.vue
@@ -16,16 +16,23 @@
{{checked2}}
+ +Two-way binding to a boolean property is defined using the standard v-model directive.
+As model is two-way binding enabled, setting the bound value as true displays the state as checked by default.
+ +Name | +Type | +Default | +Description | +
---|---|---|---|
value | +boolean | +null | +Specifies whether a inputswitch should be checked or not. | +
inputId | +string | +null | +Identifier of the input element. | +
name | +string | +null | +Name of the input element. | +
disabled | +boolean | +false | +When present, it specifies that the component should be disabled. | +
Name | +Parameters | +Description | +
---|---|---|
change | +event: Browser event. | +Callback to invoke on value change. | +
click | +event: Browser event. | +Callback to invoke on click. | +
input | +event: Checked state as a boolean. | +Callback to invoke on click. | +
focus | +event: Browser event. | +Callback to invoke when the element receives focus. | +
blur | +event: Browser event. | +Callback to invoke when the element loses focus. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-inputswitch | +Container element. | +
p-inputswitch-checked | +Container element in active state. | +
p-inputswitch-slider | +Slider element behind the handle. | +
None.
+