2.0.1 • Published 4 years ago

viking-live-field v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Viking/LiveField

Docs: https://bemky.github.io/viking-live-field/

VikingLiveField

Installation

npm install viking-live-field
new LiveField({
    target: model,
    attribute: 'name'
})

Dependencies

viking
uniform
dolla

Options

AttributeTypeNotes
targetViking.Model / Viking.Collection
attributestring
render(value, target) => htmlRender value for display
typestringtext, date, duration, select, multi_select
savebooleanto use .set(attrs) or .save(attrs). Defaults to typeof target.id !== undefined
containerstring/ElementPassed to Uniform.Popover. Determines where Popover is appended. Useful when overflow and positioning issues.
inputs[]target => Elementarray of objects or a function that returns elements to append. See Multiple Inputs below
labels{}Set language used in rendering form
labels.titletarget => textHTML for top of popover
labels.unsetstringHTML used for rendering when value is undefined
labels.recordstring / record => textHTML for labe of each record when split by record. See Collections
labels.splitstring / record => textText for "Split by ____". See Collections

Development

Docs built using Middleman, asset pipeline by Condenser

Server
bundle
bundle exec middleman server
Build
bundle exec middleman build