quasar-app-extension-db-form
1.1.2 • Public • Published Quasar App Extension DbForm
Props
Name |
Type |
Description |
Default |
Required |
Note |
model-name |
String |
Model name |
|
* |
|
value |
Object |
Model value |
|
* |
|
initial-value |
Object |
Initial value (used for clearing form) |
{} |
|
|
autofocus |
Boolean |
Focus first focusable element |
false |
|
|
before-submit |
Function |
Function call after after a validation was triggered and before emit submit |
|
|
async, throw for stop process |
is-dirty |
Boolean |
Set dirty flag for validations |
false |
|
|
extra-validations |
Object |
Validations object for merge with main validations |
{} |
|
override main |
save-on-submit |
Boolean |
Save model to DB after submit |
false |
|
|
Events
Name |
Payload |
Description |
Note |
submit |
|
Emitted when all validations have passed when tethered to a submit button |
|
reset |
|
Emitted when form cleared and all validations have been reset when tethered to a reset button |
|
cancel |
|
Emitted when form reset to loaded value and all validations have been reset when tethered to a cancel button |
|
save |
saved value object |
Emitted after model saved to DB |
|
Methods
Name |
Parameters |
Description |
Note |
submit |
|
Trigger a submit form |
|
reset |
|
Trigger a reset form to initial value (clear form) and reset validation status |
|
cancel |
|
Trigger a reset form to loaded value and reset validation status |
|
save |
|
Trigger a save model to DB |
|
Data vars
Name |
Description |
Note |
model |
Model obj |
|
notChanged |
Form not changed |
|
hasErrors |
Form has errors |
|
loadedValue |
Loaded value |
|
Slots
Name |
Scope |
Description |
Note |
default |
|
Main content |
|
Package Sidebar
Install
npm i quasar-app-extension-db-form
Weekly Downloads