New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

inline-edit

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-edit

React inline edit component able to check format and parse value

latest
Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

#Inline Edit React component Component displays value, but when clicked opens the value in text box for editing. Suports format and value validation. Depends on bootstrap.css

#!javascript
import InlineEdit, {intParser, floatParser, emailParser, genericParser} from "./index";
<InlineEdit value="10.00" valueParser={floatParser} displayModeClassName="btn btn-success"
	onChange={(value)=>console.log("new int value is: " + value)}
		displayFormat={(value)=>numeral(value).format("0,0.00")}/>
React.render(widget, document.getElementById("container"));

You can click Demo html page here to see example in action.

For sample code take a look at Demo sample

. Basically, component has 2 modes 'display' in which values is only displayed (can be also formatted), and edit, when value can be edited in textbox.

It is also possible to style the component in both modes by providing displayModeClassName and editModeClassName

Keywords

react

FAQs

Package last updated on 25 May 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