BoltInput
Utility component to be used instead of a the combination of <lightning-input> and useReactiveBinding in case of using useForm or createForm
<template> <c-bolt-input lwc:spread={$Case.Subject}></c-bolt-input> <c-bolt-input lwc:spread={$Case.Status}></c-bolt-input></template>Implements
Section titled “Implements”<lightning-input>
Section titled “<lightning-input>”<lightning-combobox>
Section titled “<lightning-combobox>”Attributes
Section titled “Attributes”mode : 'edit' | 'insert'
Section titled “mode : 'edit' | 'insert'”Defaulted to edit
shape : 'combobox' | 'radio'
Section titled “shape : 'combobox' | 'radio'”Defaulted to combobox.
Dictates how will be rendered fields of type picklist.
label : string
Section titled “label : string”type : 'text' | 'number' | 'toggle' | 'checkbox' | 'checkbox-button' | 'url' | 'email' | 'picklist' | 'tel' | 'date' | 'datetime'
Section titled “type : 'text' | 'number' | 'toggle' | 'checkbox' | 'checkbox-button' | 'url' | 'email' | 'picklist' | 'tel' | 'date' | 'datetime'”options : `Option[
Section titled “options : `Option[”Selectors
Section titled “Selectors”Attribute : [field=<ObjectApiName>.<FieldApiName>]
Section titled “Attribute : [field=<ObjectApiName>.<FieldApiName>]”Class name : .<ObjectApiName>.<FieldApiName>
Section titled “Class name : .<ObjectApiName>.<FieldApiName>”Example
Section titled “Example”import { mix, useForm, useDML, BoltElement } from 'c/boltage';import fields from './caseFields.js';export default class myLwc extends mix( BoltElement useForm({fields}), useDML) { async handleSave() { if(this.refs.form.validity) await this.saveRecord(this.Case); }}<template> <c-bolt-input lwc:spread={$Case.Subject}></c-bolt-input> <c-bolt-input lwc:spread={$Case.Status}></c-bolt-input> <c-bolt-input lwc:spread={$Case.Priority}></c-bolt-input> <c-bolt-input lwc:spread={$Case.Contact}></c-bolt-input> <lightning-button label="Save the record" onclick={handleSave}></lightning-button></template>