npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-responsive-table

v1.0.4

Published

React Native Responsive Table provide the responsive data table view in both android and IOS.

Downloads

21

Readme

react-native-responsive-table

This is an cross-platform component which provide an responsive data table view for both Android and IOS.

It is easy to use component which dynamicly fit within your view and adjust its area accordigly.

Installation and Usage

Installation

just simply install the library the library with

$ npm install react-native-responsive-table

and thats it no aditional installation require you are good to go.

Usage

  • first import the "TableView" component from react-native-responsive-table.
import {TableView} from "react-native-responsive-table"
  • now simply render the "TableView" component.
import {TableView} from "react-native-responsive-table"

<TableView 
    headers={[
        {
            name:"S.no.",
            reference_key:"no",
        },
        {
            name:"Name",
            reference_key:"name",
        },
        {
            name:"Age",
            reference_key:"age",
        },]}
    rows={[
            {
                no:1,
                name:"jhon",
                age:25
            },
            {
                no:2,
                name:"snow",
                age:23
            }
        ]}
/>
  • "reference_key" contain the value from which it extract the values from objects passed in rows array

Make sure that name to pass "reference_key" in headers. By default name will be consider as a "reference_key" :- take the refrence of above example

Render custom View in row

you can also render your custom view insted of simple text string in rows.

import {TableView} from "react-native-responsive-table";
import {TouchableOpacity, Text} from "react-native";

<TableView 
    headers={[
        {
            name:"S.no.",
            reference_key:"no",
        },
        {
            name:"Name",
            reference_key:"name",
        },
        {
            name:"Age",
            reference_key:"age",
        },
        {
            name:"Actions",
            reference_key:"action",
        }
    ]}
    rows={[
            {
                no:1,
                name:"jhon",             
                age:25,
                action:(
                    <TouchableOpacity>
                        <Text>X</Text>
                    </TouchableOpacity>
                )
            },
            {
                no:2,
                name:"snow",
                age:23,
                action:(
                    <TouchableOpacity>
                        <Text>X</Text>
                    </TouchableOpacity>
                )
            }
        ]}
/>

it gives you full power to design the row cantaine inside table view so that you can freally move around insede table view.

It's recommended to use percentage value at setting heights and width of elements to make your component responsive accross multiple devices

by default table view adjust itself in available width but you cn also make it horizontal scrollable by playing with following properties.

Properties

name | description | type | default :--------------- |:------------------------------ |:-------- |:-------- width | it set the width of table view (by defaul it is off full width of the device) | Number & Percent | device width (100%) height | it set the height of table view (by defaul it is off 50% of the device) | Number & Percent | 50% (device height) horizontalScroll | to enable the horizontal scroll within table | Boolean | false columnWidth | Set the width of column (only works when horizontalScroll is enabled)| Number | 50 headerHeight | to set the height of header on table | Number | 50

TO DO :-

  • make table container style adjustable
  • insert customs style to headers and rows

ABOUT :-

Nothing is perfect in this world as this package is in its initial age so you may face some bugs and difficulties by using this but i am intresterd to know about your thoughts regarding this package so i can develop it more further and i hope that some of you may interested helping me with this package and give me new ideas that help me building this more further.

you can mail me your reviews and idea to my gmail account [email protected]