Giter Club home page Giter Club logo

canopy-open-source-fe's Introduction

Canopy Component Library

Canopy Table

Features
  • Column selector
  • Client and Server side search support
  • Client side and server side sorting support
  • Client and Server side pagination support
  • Custom Pagination support
  • custom filters

Install

npm i canopy-components --save

Import

Import { CanopyTable } from "canopy-components";

API

  • title: Title to be displayed on the table
    • Type : String
    • Required : TRUE
  • dataKey: Key to access data passed into table
    • Type : String
    • Required : TRUE
  • dataLoad: Data to be displayed on the table
    • Type : Array [ type:Object ]
    • Required : TRUE Object Specification
  data: [];
  loading: boolean;
  error: { message: string };
  meta: Record<string, unknown>;
  • Required : TRUE

columns: Columns to be displayed on the table

  • Type : Array [ type:Object ]
  • Required : TRUE Object Specification
  key: string;
  headerText?: string;
  type: string;
  otherKeys?: Array<string>;
  colSpan?: number;
  expandRow?: boolean;
  canReorder?: boolean;
  canResize?: boolean;
  canSort?: boolean;
  actions?: Array<Record<string, string>>;
  subTableColumns?: Record<string, string>;
  width?: number;
  align?: "center" | "left" | "right";
  maxWidth?: number;
  showOnSubTable?: boolean;
  selectedByDefaultOn?: Array<"mobile" | "tablet" | "desktop">;
  headerTextVariables?: Array<Record<string, string>>;
  sticky?: string;
  customCell?: any;

showSearchOn: To add search on the table

  • Type : ["desktop", "tablet", "mobile"] Or []
  • Required : FALSE

showColumnSelectorOn: To add colum selectors on the table

  • Type : ["desktop", "tablet", "mobile"] Or []
  • Required : FALSE

showPagination: To enable and disable pagination on table

  • Type : Boolean
  • Required : FALSE

per_page: Data to be displayed per page on the table

  • Type : Number default 20
  • Required : _FALSE_

customTablePager: To add custom pagination Component

  • Type : React.ReactNode
  • Required : _FALSE_

customTableFilter: To add custom Filter Component

  • Type : React.ReactNode
  • Required : FALSE

clientSideSearch: To add enable and disable client side search

  • Type : Boolean
  • Required : FALSE

clientSideSort: To add enable and disable client side sorting

  • Type : Boolean
  • Required : FALSE

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache License 2.0.

Copyright 2021 Canopy Pte Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

An unmodified copy of the above license text must be included in all forks.

To obtain the software under a different license, please contact hello <at> canopy.cloud.

canopy-open-source-fe's People

Contributors

sourabhkumawat avatar

Watchers

James Cloos avatar Rajnish Kumar avatar Prashant  avatar  avatar  avatar Tanmai Sharma avatar  avatar  avatar  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.