Skip to content

Instantly share code, notes, and snippets.

View denisraslov's full-sized avatar

Denis Raslov denisraslov

  • Revolut
  • London, UK
View GitHub Profile
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()) {
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,
import { Grid, Input, Select } from 'react-spreadsheet-grid';
class GridContainer extends React.PureComponent {
render() {
return (
<Grid
rows={this.state.rows}
columns={this.state.columns}
/>
);
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
};
{
title() {
return 'Name';
},
value(row) {
return (
<span>{row.name}</span>
);
}
}
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'
}, {