New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-easy-edit

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-easy-edit

A react library for inline editing

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-74.11%
Maintainers
1
Weekly downloads
 
Created
Source

Test License: MIT

react-easy-edit

A simple react library for input inline editing

Features

  • Supports most of the HTML5 input components
  • Highly customisable!

Props

PropTypeRequiredDefaultDescription
typestringYesThe type of the input element to display. Supported types are text, number, color, textarea, date, datetime-local,time, month, week, radio, checkbox, select
valuestring or number or arrayNonullThe value of the input element depended on its type
optionsarrayNoA key value pair object that is used as available options for select, radio and checkbox.options = [{label:'Test One', value: '1'},{label:'Test Two', value: '2'}];
saveButtonLabelstringNoSaveThe label to be used for the "Save" button
saveButtonStylestringNoeasy-edit-buttonOne or more CSS classes to be used to style the "Save" button
cancelButtonLabelstringNoCancelThe label to be used for the "Cancel" button
cancelButtonStylestringNoeasy-edit-buttonOne or more CSS classes to be used to style the "Cancel" button
placeholderstringNoClick to editThe text to be shown as a hint that describes the expected value of the input element
onCancelfunctionNo() => {}A function that will be called when editing is cancelled
onSavefunctionYesA function that will be called when editing is saved
namestringYes
minstring or numberNo
maxstring or numberNo

Installation

npm i react-easy-edit

Usage

A simple example

import React, { Component } from 'react';
import EasyEdit from 'react-easy-edit';

class App extends Component {
  render() {
    return (
        <EasyEdit
          type="text"
          value="My test field"
          onSave={()=>{}}
          name="test"
        />
    );
  }
}

export default App;

Licence

react-easy-edit is an open source library licensed as MIT.

Keywords

FAQs

Package last updated on 05 Mar 2019

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