X-Editable for React with Bootstrap
# npm
npm install react-bootstrap-xeditable
# yarn
yarn add react-bootstrap-xeditable
import bootstrap css and xeditable css
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://vitalets.github.io/x-editable/assets/x-editable/bootstrap3-editable/css/bootstrap-editable.css">
<EditableTextField name='username' value={this.state.value} onUpdate={this.handleUpdate} placeholder='Please input your username'/>
const options = [
{
text: 'China',
value: 'CN'
}, {
text: 'India',
value: 'IN'
}, {
text: 'United Kingdom (UK)',
value: 'UK'
}, {
text: 'United States of America (USA)',
value: 'USA'
}
];
<EditableSelect name='country' onUpdate={this.handleUpdate} value={this.state.value} options={options}/>
- ✅ : Supported
- 🏃 : In Progress
- 💭 : Planning
Element | Support | ReactXElement |
---|---|---|
textfield | ✅ | EditableTextField |
select | ✅ | EditableSelect |
textarea | ✅ | EditableTextArea |
date | 💭 | |
datetime | 💭 | |
select2 | 💭 |
Comming soon.
- Only support inline mode
- onBlur not support yet
Licensed under the GPL-3.0 license. Copyright (C) 2016 Kun Yan