Socket
Book a DemoInstallSign in
Socket

react-responsive-pagination-table

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-responsive-pagination-table

Easy responsive table manage.Single delete,multiple delete, Edit single singel filed,search gobal and single filed and more....

unpublished
latest
Source
npmnpm
Version
0.1.10
Version published
Maintainers
1
Created
Source

React Responsive Pagination Table

Easy responsive table manage.Single delete,multiple delete, Edit single singel filed,search gobal and single filed and more....

Installation

npm i react-responsive-pagination-table
or
yarn add react-responsive-pagination-table

Usage

## Child Comp
import * as LibraryComponents from "react-responsive-pagination-table"
interface ListProps {
  data: any
  isDelete?: boolean
  isEditModify?: boolean
  onDelete?: (selectedItem: LibraryModels.Confirm) => void
  onSelectedRow?: (selectedItem: any) => void
  onUpdateItem?: (value: any, dataField: string, id: string) => void
}
const List = (props: ListProps) => {
  return (
    <LibraryComponents.Organisms.TableBootstrap
      id="_id"
      data={props.data}
      columns={[
        {
          dataField: "_id",
          text: "Id",
          hidden: true,
          csvExport: false,
        },
        {
          dataField: "title",
          text: "Title",
          sort: true,
          filter: LibraryComponents.Organisms.Utils.textFilter(),
          headerStyle: { minWidth: "200px" },
        },
      ]}
      isEditModify={props.isEditModify}
      isSelectRow={true}
      fileName="List"
      onSelectedRow={(rows) => {
        props.onSelectedRow && props.onSelectedRow(rows.map((item: any) => item._id))
      }}
      onUpdateItem={(value: any, dataField: string, id: string) => {
        props.onUpdateItem && props.onUpdateItem(value, dataField, id)
      }}
    />
  )
}
export default List

## Parent Comp
import List from './List';

const array: [
  {
    _id:"86fds987fgfdsg86",
    name: 'Collection',
    title: 'Master Setup',
  },
  {
    _id:"86fds987fgfdsg87",
    name: 'Setting',
    title: 'Login Activity',
  }
];

<List
            data={array}
            isDelete={true}
            isEditModify={false}
            onDelete={(selectedItem) =>console.log({selectedItem})}
            onSelectedRow={(rows) => console.log({rows})}
            onUpdateItem={(value: any, dataField: string, id: string) => {
             console.log({value,dataField,id})
            }}
          />

Outputs

☆━━━━━━━━━━━━━━━━━━━☆☆━━━━━━━━━━━━━━━━━━━☆ Mobile No: +91 9260303151
Email Id: onlyappasaheb4@gmail.com
Github: www.github.com/appasaheb4
Website: www.tech-abl.com ☆━━━━━━━━━━━━━━━━━━━☆☆━━━━━━━━━━━━━━━━━━━☆

Contributes / Support

  • More content here : https://www.youtube.com/tech-abl

  • Submit your pr for idea / issue / feature

    How To Contribute

    - Fork and clone this repository
    - Make some changes as required
    - Write unit test to showcase its functionality
    - Run the test suites to make sure it's not breaking anything `$ npm test`
    - Submit a pull request under `dev` branch
    

😊 ALWAYS WELCOME 😊

Keywords

react

FAQs

Package last updated on 29 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts