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-customtable-test-alvaro

v1.0.6

Published

Prueba de tabla dinamica en React

Downloads

9

Readme

Props de Custom Table

(Array) rows : Lista de objetos a partir de los cuales se rellenara la tabla
    ejemplo : [
        {name: 'a'},
        {name: 'b'},
        {name: 'c'}
    ]

(Array) headCells : Lista de objetos con los datos de la primera celda de cada columna
    objeto : 
        (String)   id: Nombre del campo que debe imprimir de los objetos de las lineas,
        (Boolean)  disablePadding: Quita el padding de la celda,
        (String)   label: Contenido de la celda,
        (String)   align: Alineacion que recibe la primera casilla de la columna que puede ser 'left', 'center' o 'right',
        (String)   alignContent: Alineacion que reciben las casillas de la columna que puede ser 'left', 'center' o 'right',
        (Function) style: Funcion de un parametro que retorna el contenido con un estilo personalizado
    ejemplo: [
        {
            id: 'name',
            numeric: false,
            disablePadding: false,
            label: 'Nombre',
            align: 'center,
            alignContent: 'left',
            style: styleFunction
        },
    ]
    ejemplo styleFunction : = ( content ) => { return ( <Chip label={content} /> ) }
             
(String) title : String que se muestra como titulo sobre la tabla

(Array) validation : Lista de objetos con las validaciones con las que se podra filtrar la tabla
    objeto : 
        (String)  type: tipo de la validacion que se desea,
            Tipos : 'select', 'numericRange', 'dateRange'
        (String)  target : Nombre del campo de la "row" sobre el cual se aplicara el filtro,
        (String)  title: Etiqueta que se mostrara sobre el filtro para identificarlo,
        (Array[String])  options: En caso de ser un 'select' opciones que se mostraran en el filtro 
    Ejemplo : [
        {
            type: 'select',
            target: 'name',
            title: 'tipo',
            options: [ 'a', 'b' ],
        },
        {
            type: 'numericRange',
            target: 'age',
            title: 'Age'
        },
        {
            type: 'dateRange',
            target: 'date',
            title: 'Date'
        },
    ]

(Bollean) search : determina si se desea filtro de texto

(Array) actions : Lista de objetos a travez del cual se agregan las acciones para cada row
    objeto : 
        (String)  action : nombre de la accion a realizar,
        (String)  label: texto que se mostrara como opcion,
        (HTML?)   icon: icono que se mostrara junto a la opcion,
    ejemplo : [
        { action: 'view', label: 'View', icon: <Visibility /> },
        { action: 'edit', label: 'Edit', icon: <Edit /> }
    ];

(Function) handleAction : funcion a travez de la que se trigerean las acciones
    ejemplo : = (menu, id) => {
                    console.log('menu', menu, 'index', id)
                    if (menu.action === 'view') {
                        console.log('ver')
                    } else if (menu.action === 'edit') {
                        console.log('editar')
                    }
                }
(Function) add : funcion que se ejecutal al precionar el boton add

(String) addText : Texto con el que se muestra el boton add