1.0.3 • Published 9 months ago

ino-gridview v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

ino-gridview

A customizable GridView component for React applications.

Installation

Install the package using npm:

## Usage

Here's a basic example of how to use the GridView component:

import React from "react";
import GridView from "ino-gridview";
const MyComponent = () => {
  const renderItem = ({ item, index, isActive }) => (
    <div className={isActive ? "active" : ""}>{item.title}</div>
  );
  return (
    <GridView
      id="my-grid"
      rowItemsCount={5}
      rowCount={4}
      itemsTotal={100}
      itemWidth={10}
      itemHeight={5}
      isActive={true}
      renderItem={renderItem}
      data={/ Your data array /}
    />
  );
};
export default MyComponent;

Props

The GridView component accepts the following props: I understand. Thank you for providing that example. I'll create a similar table for your GridView component based on the props you've specified earlier. Here's how it should look:

The GridView component accepts the following props:

PropTypeDefaultDescription
idstring-Unique identifier for the GridView
uniqueKeystring'list-'Prefix for item keys
nativeControlebooleanfalseEnable native keyboard control
debouncenumber300Debounce time for keyboard events (ms)
scrollOffsetnumber0Vertical scroll offset
rowItemsCountnumber-Number of items per row
rowCountnumber-Number of rows to display
bufferStartnumber0Number of buffer rows at the start
bufferEndnumber0Number of buffer rows at the end
itemsTotalnumber-Total number of items
itemWidthnumber-Width of each item (in rem)
itemHeightnumber-Height of each item (in rem)
isActiveboolean-Whether the GridView is currently active
initialActiveIndexnumber0Initial active item index
direction'ltr' | 'rtl''ltr'Text direction
onMouseEnterfunction() => {}Callback when mouse enters an item
onChangeRowfunction() => {}Callback when active row changes
onUpfunction() => {}Callback for up navigation
onDownfunction() => {}Callback for down navigation
onLeftfunction() => {}Callback for left navigation
onRightfunction() => {}Callback for right navigation
onBackfunction() => {}Callback for back action
renderItemfunction-Function to render each item
dataarray-Array of data items to render

Development

To build the package:

## License

This project is licensed under the MIT License.
1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago