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 🙏

© 2026 – Pkg Stats / Ryan Hefner

df-react-grid

v0.2.8

Published

DFGrid is an extended version of React Ag-grid with additional features. This package contains all the functions used in the native Ag-grid. All information can be found in the official [Documentation](https://ag-grid.com/documentation/) The package uses

Readme

DFGrid React

DFGrid is an extended version of React Ag-grid with additional features. This package contains all the functions used in the native Ag-grid. All information can be found in the official Documentation The package uses just MIT licence features.

The package allows to add a panel to the installed: search field custom HTML block import button export button Add row button show / hide burger menu columns

addRowButton - //Allows to add new record, optional, default = false
widthGrid - //Sets the width of the grid, optional, default = undefined. See more info in official documentation
heightGrid - //Sets the height of the grid, optional, default = undefined. See more info in official documentation,
allowExport - //Allows to export data from a table, optional, default = false
allowImport - //Allows to import data from a table, optional, default = false
actionsComponent - //Allows to add a custom component to the panel, optional, default = undefined

In addition to the standard columnDef parameters, you can use several additional parameters. tempData - used to get data in case the user wants to download an example file. format is used in conjunction with type = 'date' when you are using the column type as date.

Example

Then run the example inside another:

import React, { useState } from "react";
import { DFGrid, DFColumn } from "df-react-grid";
import dayjs from 'dayjs';

const DEFAULT_FORMAT = 'DD MMM, YYYY';

const cellRendererSelector = (params) => {
    const type = params.colDef.type;
    if (type === 'date') {

        return {
            component: 'agRendererDate'
        };
    }

    return undefined;
};

export default function App() {
    const [gridApi, setGridApi] = useState(null);
    const [gridColumnApi, setGridColumnApi] = useState(null);
    const [rowData, setRowData] = useState(null);

    const onGridReady = (params) => {
        setGridApi(params.api);
        setGridColumnApi(params.columnApi);

        const updateData = (data) => {
            setRowData(data.slice(0, 50));
        };

        fetch("https://www.ag-grid.com/example-assets/olympic-winners.json")
            .then((resp) => resp.json())
            .then((data) => updateData(
                [
                    { country: 'United States', athlete: 'Alex', age: '15', date: 'Nov 29 2021' },
                    { country: 'United States 1', athlete: 'Alex 1', age: '15', date: 'Dec 12 2020 10:00:00 AM' },
                    { country: 'United States 2', athlete: 'Alex 2', age: '15', date: new Date('Nov 11 2007 10:00:00 AM') },
                    { country: 'United States 2', athlete: 'Alex 2', age: '15', date: new Date('Nov 08 2007 10:00:00 AM') },
                    { country: 'United States 2', athlete: 'Alex 2', age: '15', date: new Date('Oct 10 2007 10:00:00 AM') },
                    { country: 'United States 2', athlete: 'Alex 2', age: '15', date: new Date('12-06-2014') },
                    { country: 'United States 3', athlete: 'Alex 3', age: '15', date: new Date('04-03-2006') },
                    ]
            ));
    };

    const dateComparator = (a, b) => new Date(b) - new Date(a);

    const dateFilterParams = {
        comparator: function (filterLocalDateAtMidnight, cellValue) {
            if (new Date(filterLocalDateAtMidnight) === new Date (cellValue)) {
                return 0;
            }
            if (new Date (cellValue) < new Date(filterLocalDateAtMidnight)) {
                return -1;
            }
            if (new Date (cellValue) > new Date(filterLocalDateAtMidnight)) {
                return 1;
            }
        },
        browserDatePicker: true,
    };

    return (
        <div className="App">
            <DFGrid
                rowData={rowData}
                widthGrid="100%"
                defaultColDef={{
                    flex: 1,
                    minWidth: 150,
                    filter: true,
                    filterParams: {
                        buttons: ['reset', 'apply']
                    }
                }}
                heightGrid="400px"
                addRowButton
                allowExport
                allowImport
                actionsComponent={<SomeComponent />}

                frameworkComponents={{
                    agRendererDate: getRendererDate
                }}

                onGridReady={onGridReady}
            >
                <DFColumn field="country" sortable  editable tempData={['United States', 'Australia', 'Canada']} />
                <DFColumn field="athlete" minWidth={180} tempData={['Alex']} />
                <DFColumn field="age" filter="agNumberColumnFilter" />
                <DFColumn field="date"
                            headerName='Date'
                    type="date"
                    // format={'DD MM,---- YY'}
                    editable={false}
                    minWidth={150}
                    valueGetter={params => {
                        const format = params.colDef.format || DEFAULT_FORMAT;
                        const cellValue = params.data[params.colDef.field];
                        const isValid = dayjs(cellValue).isValid();
                        return isValid ? dayjs(cellValue).format(format) : ''
                    }}
                    filter="agDateColumnFilter"
                    comparator={dateComparator}
                    filterParams={dateFilterParams}
                    cellRendererSelector={cellRendererSelector}
                    tempData={[ '12.12.2020', new Date('Dec 11 2020 10:00:00 AM'), new Date('Dec 12 2020 10:00:00 AM'), new Date('Dec 13 2020 10:00:00 AM')]}
                />

            </DFGrid>
        </div>
    );
}