
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
ember-ds-inline-edit
Advanced tools
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
ember install ember-ds-inline-edit
Use the ds-inline-edit
component and provide it a model with the property to edit/display.
{{ds-inline-edit
model=model
prop='name'
customUpdate=(action updateModelName)
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}}
By default, this plugin relies on a strict usage of Ember Data. An automatic model update is sent upon confirming edit. This behavior can be overriden by passing in a customUpdate action :
customUpdate(value, model, prop)
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.
Feel free to extend ds-inline-edit
using the following code :
// app/pods/components/ds-inline-edit
import DsInlineEdit from 'ds-inline-edit/components/ds-inline-edit'
export default DsInlineEdit.extend({})
You can override the following functions :
onEditSuccess()
- Called when the model is updated successfully
onEditError(error)
- Called on update failure (due to error from network or customUpdate)
Hit enter
to confirm changes.
Hit esc
or click outside the component to discard the changes.
When an error occurs, an onError
action is executed.
FAQs
EmberJS addon for editing DS.models inline
The npm package ember-ds-inline-edit receives a total of 5 weekly downloads. As such, ember-ds-inline-edit popularity was classified as not popular.
We found that ember-ds-inline-edit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.