This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import AdminContent from 'react/components/adminContent'; | |
import UserContent from 'react/components/userContent'; | |
class Page extends React.PureComponent { | |
render() { | |
// a Backbone way - still using the global APP instance | |
if (APP.isUserAdmin()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import { Grid, Input, Select } from 'react-spreadsheet-grid'; | |
import set from 'lodash.set'; | |
import users from './users.json'; | |
const positions = [{ | |
id: 1, | |
name: 'System Architect' | |
},{ | |
id: 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Grid, Input, Select } from 'react-spreadsheet-grid'; | |
class GridContainer extends React.PureComponent { | |
render() { | |
return ( | |
<Grid | |
rows={this.state.rows} | |
columns={this.state.columns} | |
/> | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Grid, Input, Select } from 'react-spreadsheet-grid'; | |
class GridContainer extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
// It is initially not loaded | |
this.state = { | |
loaded: false | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
title() { | |
return 'Name'; | |
}, | |
value(row) { | |
return ( | |
<span>{row.name}</span> | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Grid, Input, Select } from 'react-spreadsheet-grid'; | |
// Define the array of positions to choose from them through Select | |
const positions = [{ | |
id: 1, | |
name: 'System Architect' | |
},{ | |
id: 2, | |
name: 'Frontend Developer' | |
}, { |
OlderNewer