Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-ds-inline-edit

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-ds-inline-edit

EmberJS addon for editing DS.models inline

  • 0.3.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Edit an ember DS.model inline by clicking on it to toggle editor. Click outside or press escape to rollback change and cancel edit.

inspired by ember-inline-edit

Inline Edit Demo

Installation

ember install ember-ds-inline-edit

Usage

Use the ds-inline-edit component and provide it a model with the property to edit/display.

  {{ds-inline-edit
    model=model
    prop='name'
    onError=(action send 'onError')
    onUpdate=(action send 'onUpdate')
  }}

Customize input template using #ds-inline-edit :

  {{#ds-inline-edit model=person prop='age' as |age|}}
    {{input type="number" class="form-control" value=age}}
  {{/ds-inline-edit}}
Ember Data Integration

This plugin relies on a strict usage of Ember Data. An automatic model update is sent upon confirming edit.

If the prop is an object, the default display is the following property of the model : displayName > name > id

Only the property identified through prop is updated, the rest of the model remains uncommited.

When an update is successful, the onUpdate function is called with the updated model.

Keyboard Support

Hit enter to confirm changes. Hit esc or click outside the component to discard the changes.

Error Handling

When an error occurs, an onError action is executed.

Keywords

FAQs

Package last updated on 04 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc