Skip to content

Few upgrades #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,52 @@ Material UI Table Edit
## Usage

```javascript
const React = require('react')
const ReactDOM = require('react-dom')
const getMuiTheme = require('material-ui/styles/getMuiTheme').default
const baseTheme = require('material-ui/styles/baseThemes/darkBaseTheme')
const EditTable = require('material-ui-table-edit')
const container = document.createElement('div')
'use strict';
import React from 'react';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import baseTheme from 'material-ui/styles/baseThemes/lightBaseTheme';
import EditTable from '..';

document.body.appendChild(container)
const headers = [
{value: 'Name', type: 'TextField', width: 200},
{value: 'Address', type: 'TextField', width: 200},
{value: 'Phone', type: 'TextField', width: 200},
{value: 'Enabled', type: 'Toggle', width: 50},
{value: 'Last Edited By', type: 'ReadOnly', width: 100}
{
value: 'Last Edited By',
type: 'ReadOnly',
style: {
fontSize: '14px',
width: 100,
marginLeft: '5px'
}
}
]

const rows = []
const rows = [
{columns: [
{value: 'Michael'},
{value: '1212 Somewhere st.'},
{value: '555-1212'},
{value: false},
{value: 'Michael at 4:20pm'}
]},
{columns: [
{value: 'Sara'},
{value: '1212 Somewhere st.'},
{value: '555-1212'},
{value: true},
{value: 'Someone at 5:50pm'}
]},
{columns: [
{value: 'Randy Randerson'},
{value: '5555 Somewhere st.'},
{value: '888-555-3333'},
{value: true},
{value: 'Randy at 3:33pm'}
]}
]

const onChange = (row) => {
console.log(row)
Expand Down
Loading