Skip to content

Instantly share code, notes, and snippets.

View jsdaniell's full-sized avatar
💭
Good Insights!

José Daniel jsdaniell

💭
Good Insights!
View GitHub Profile
@jsdaniell
jsdaniell / mui-datatable-crud-rows.js
Created July 25, 2019 13:41
Mui-Datatable with delete, add and edit options for rows.
import React from "react";
import ReactDOM from "react-dom";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import TextField from "@material-ui/core/TextField";
import Switch from "@material-ui/core/Switch";
import MUIDataTable from "mui-datatables";
import Cities from "./cities";
class Example extends React.Component {
constructor(props) {
@jsdaniell
jsdaniell / cities.js
Created July 25, 2019 13:35
Mui-Datatable with possibilite of edit fields and checking buttons, also pagination.
import React from "react";
import PropTypes from "prop-types";
import MenuItem from "@material-ui/core/MenuItem";
import FormControl from "@material-ui/core/FormControl";
import Select from "@material-ui/core/Select";
class Cities extends React.Component {
static propTypes = {
value: PropTypes.string.isRequired,
index: PropTypes.number.isRequired,
@jsdaniell
jsdaniell / mui-datatable-filtering.js
Created July 25, 2019 13:21
Mui-Datatable with filter on columns, showing filtered properties on top.
import React from "react";
import ReactDOM from "react-dom";
import MUIDataTable from "mui-datatables";
import Chip from "@material-ui/core/Chip";
class Example extends React.Component {
render() {
const columns = [
{
name: "Name",
@jsdaniell
jsdaniell / mui-datatable-tags.js
Last active July 25, 2019 13:18
Mui-Datatable with fixed width and intern scroll, also pagination and tags on rows.
import React from "react";
import ReactDOM from "react-dom";
import MUIDataTable from "mui-datatables";
// Chip is the element used for decorate tags
import Chip from "@material-ui/core/Chip";
class Example extends React.Component {
render() {