Coder Social home page Coder Social logo

ccastello / tubular-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unosquare/tubular-react

0.0 0.0 0.0 21.23 MB

Material UI table with local or remote data-source. Featuring filtering, sorting, free-text search, export to CSV locally, and aggregations.

Home Page: https://unosquare.github.io/tubular

License: MIT License

JavaScript 1.66% TypeScript 98.34%

tubular-react's Introduction

Analytics npm version Buils status

Tubular-React

โญ Please star this project if you find it useful!

Tubular-React is a Material-UI table (or data grid) with local or remote data-source. Featuring:

  • Define a custom layout for columns and cells using render methods.
  • Use a remote or local datasource. Remote datasource use a specific Request and Response format.
  • Sort and filter multiple columns.
  • Free-text search of string columns.
  • Page data. Remote data is paged in the server side.
  • Export data to a CSV file.
  • Print data.

You can try a CodeSandbox demo.

Please visit the Tubular GitHub Page to learn how quickly you can start coding. See Related projects below to discover more Tubular libraries and backend solutions.

Table of contents

Installation

$ npm install tubular-react --save

Usages

You can check the documentation of the components at https://unosquare.github.io/tubular/tubular-react

DataGrid

You can start using DataGrid with this sample code. The grid will connect to a remote datasource or have a local datasource depending on what it's passed in the dataSource property.

To create Column you have to use createColumn function and have to pass the desired name of column as string.

import React from 'react';
import ReactDOM from 'react-dom';

import { DataGrid } from 'tubular-react';
import {createColumn} from "tubular-common";

const columns = [createColumn('OrderID'), createColumn('CustomerName'), createColumn('ShipperCity')];

const SampleGrid = () => (
    <DataGrid columns={columns} dataSource={'https://tubular.azurewebsites.net/api/orders/paged'} gridName="Grid" />
);

ReactDOM.render(<SampleGrid />, document.getElementById('root'));

This is a preview of the previous code:

DataGrid

DataGrid with a remote data source

It is possible to display data from a remote source.

Remote

Edit RemoteDataGrid -Example

DataGrid with a local data source

It is possible to display data from a local data source.

Local

Edit LocalDataGrid -Example

Tubular react in a grid list

Tubular can also be used to render data in a different layout.

Grid

Edit GridList -Example

Adding/Removing columns dynamically

You can add or remove columns quickly and easily.

addAndRemoveColumns

Edit ColumnFeatures -Example

Run integrated sample

There is a sample included in this project, you can run it just by doing the following.

// Install all the dependencies
npm install
// Run the sample project
npm start

i18n Support

Tubular React now includes a brand new Language Service that will translate the content of the grid to a preferred language. Devs can also implement content on their language and import it to use this language. By default, Tubular React comes with implementations in English and Spanish. If any key content needs parameters to include in the translation, devs can pass the parameters in the translate function.

import { Lang } from 'tubular-react';

Lang.translate('PageNum', 16);
// => 'Page 16'

Related Projects

Name Type Language/tech Description
Tubular for AngularJS (formerly Tubular) Library AngularJs Tubular provides a set of directives and services using AngularJS as framework.
Tubular for Angular6 (formerly Tubular2) Library Angular6 New Tubular2 with Angular6 (Angular2) and Angular Material 2.
Tubular React Library React Tubular-React is a DataGrid component using Material-UI
Tubular Common Library Javascript/Typescript Tubular Common provides TypeScript and Javascript models and data transformer to use any Tubular DataGrid component with an array of Javascript objects.
Tubular Dotnet Backend library C#/.NET Core Tubular provides .NET Framework and .NET Core Library to create REST service to use with Tubular Angular Components easily with any WebApi library (ASP.NET Web API for example).
Tubular Nodejs Backend Library Javascript Tubular Node.js provides an easy way to integrate Tubular Angular Components easily with any Node.js WebApi library.
Tubular Boilerplate C# Boilerplate C# Tubular Directives Boilerplate (includes AngularJS and Bootstrap)
Tubular Boilerplate Boilerplate Javascript/AngularJS Tubular Directives Boilerplate (includes AngularJS and Bootstrap).
Tubular ASP.NET Core 2.0 Boilerplate Boilerplate C#/.NET Core Tubular Directives Boilerplate (includes AngularJS and Bootstrap).

tubular-react's People

Contributors

geoperez avatar dependabot-preview[bot] avatar kadosh avatar arcigo avatar marcolpr avatar jpalcala avatar anyxleo avatar alexis-wizeline avatar buda1994 avatar nickpalmer avatar israelramosm avatar cifucid09 avatar metalerk avatar manusanram avatar xquetzalcoatl avatar erickgarciarios avatar serk352 avatar dependabot[bot] avatar solenasth avatar osmarpb97 avatar rohanksahu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.