react-list-evina
v1.1.6
Published
A powerful and customizable React component for displaying and managing lists. Built with TypeScript and Styled Components, it offers rich features, flexibility, and modern design.
Downloads
193
Readme
ListView EVINA (REACT)
A powerful and customizable React component for displaying and managing lists. Built with TypeScript and Styled Components, it offers rich features, flexibility, and modern design.
🚧 Development Status
⚠️ Note:
This component is 100% usable but currently in beta and under active development. Some features might change, and additional functionalities will be introduced in future releases.
This repository is currently private.
It will be made public soon to allow community contributions and access.
Stay tuned for updates!
Features
- Draggable List Items: Built-in drag-and-drop support using
react-dnd
. - Search and Filter: Includes a search bar and filtering options.
- Sorting: Support for sorting list items.
- Customizable UI: Styled with
styled-components
for easy theming. - Icons Support: Includes
react-icons
for additional UI enhancements. - Export Options: Export data to CSV, PDF, or Excel formats.
- Export Options: Generic datasource.
- Grouping: Grouping data based on selected key.
- Multi-language support: Supports nine languages including English, French, Italian ,...
Installation
Install the package using npm or yarn:
npm install react-list-evina
⚙️ Props
| Prop | Type | Default | Description |
|----------------------------|------------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------|
| rtl
| boolean
| false
| Enables right-to-left layout. |
| locale
| 'en' | 'it' | 'fr' | 'es' | 'de' | 'fa' | 'pt' | 'ar' | 'tr'
| 'en'
| Sets the language for the component. |
| dataSource
| Array<T>
| []
| Data array to be displayed in the list. |
| title
| string
| ''
| The title displayed above the list. |
| searchEnable
| boolean
| false
| Enables the search bar for filtering items. |
| sortEnable
| boolean
| false
| Enables sorting functionality for the list items. |
| readOnly
| boolean
| false
| Disables all interactions with the list items. |
| moveItemsEnable
| boolean
| false
| Enables drag-and-drop functionality for reordering items. |
| multipleSelectionEnabled
| boolean
| false
| Allows selecting multiple items at once. |
| theme
| 'dark' | 'light' | 'custom'
| 'light'
| Defines the theme of the component. |
| customTheme
| ThemeStyles
| null
| Custom styles for the component if theme
is set to 'custom'
. |
| onDataSourceChange
| (newDataSource: Array<T>) => void
| null
| Callback fired when the data source changes. |
| onItemClick
| (item: T) => void
| null
| Callback fired when a list item is clicked. |
| onItemDblClick
| (item: T) => void
| null
| Callback fired when a list item is double-clicked. |
| onDeleteItem
| (items: Array<T>) => Promise<void> | void
| null
| Callback fired when one or more items are deleted. |
| keyExpr
| string
| null
| Unique identifier field for items. |
| showKeys
| Array<string>
| null
| Specifies which keys to display for each item. |
| itemTemplate
| React.FC<{ data: T; highlightText: (text: string) => ReactNode }>
| null
| Custom template for rendering list items. |
| querySyntaxEnable
| boolean
| false
| Enables query syntax for advanced search. |
| autoCompleteEnable
| boolean
| false
| Enables autocomplete functionality in the search bar. |
| pagination
| number
| null
| Number of items per page for pagination. |
| keysTooltipEnable
| boolean
| false
| Enables tooltips for displayed keys. |
| exportEnable
| boolean
| false
| Enables data export functionality (CSV, PDF, etc.). |
| groupEnable
| boolean
| false
| Enables grouping of items based on a field. |
| groupByField
| string
| null
| The field by which items will be grouped. |
| highlightSearchTermEnable
| boolean
| false
| Highlights matching terms in the list items during search. |
| columnHeadersEnable
| boolean
| false
| Displays column headers for the list view. |
| customColumnHeader
| Array<string>
| null
| Custom column headers to display in the list view. |
Usage
import React from 'react';
import ListView from 'react-list-evina';
const App = () => {
const data = [
{ id: 1, name: 'Item 1', description: 'This is item 1' },
{ id: 2, name: 'Item 2', description: 'This is item 2' },
];
return (
<div>
<h1>My ListView</h1>
<ListView items={data} />
</div>
);
};
export default App;
license
This project is licensed under the MIT License. Feel free to use it.