New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ka-table

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ka-table - npm Package Compare versions

Comparing version 2.3.1 to 2.4.1

Components/NoDataRow/NoDataRow.js

2

Components/DataRow/DataRow.js

@@ -17,3 +17,3 @@ var __assign = (this && this.__assign) || function () {

var DataRow = function (props) {
var groupColumnsCount = props.groupColumnsCount, rowData = props.rowData, rowKeyField = props.rowKeyField, dataRow = props.dataRow, _a = props.selectedRows, selectedRows = _a === void 0 ? [] : _a, trRef = props.trRef;
var groupColumnsCount = props.groupColumnsCount, rowData = props.rowData, rowKeyField = props.rowKeyField, dataRow = props.dataRow, selectedRows = props.selectedRows, trRef = props.trRef;
var rowKeyValue = rowData[rowKeyField];

@@ -20,0 +20,0 @@ var isSelectedRow = selectedRows.some(function (s) { return s === rowKeyValue; });

@@ -15,17 +15,10 @@ var __assign = (this && this.__assign) || function () {

import { ActionType } from '../../enums';
import { getExpandedGroups, getGroupedData } from '../../Utils/GroupUtils';
import VirtualizedRows from '../VirtualizedRows/VirtualizedRows';
import Rows from '../Rows/Rows';
var TableBody = function (props) {
var data = props.data, groupedColumns = props.groupedColumns, groups = props.groups, dispatch = props.dispatch, onOptionChange = props.onOptionChange;
var groupsExpanded = props.groupsExpanded;
var groupedData = groups ? getGroupedData(data, groups, groupedColumns, groupsExpanded) : data;
if (groups && !groupsExpanded) {
onOptionChange({ groupsExpanded: getExpandedGroups(groupedData) });
return React.createElement(React.Fragment, null);
}
var dispatch = props.dispatch;
return (React.createElement("tbody", { className: defaultOptions.css.tbody, onScroll: function (event) {
dispatch(ActionType.ScrollTable, { scrollTop: event.currentTarget.scrollTop, timeStamp: event.timeStamp });
} },
React.createElement(VirtualizedRows, __assign({}, props, { data: groupedData }))));
React.createElement(Rows, __assign({}, props))));
};
export default TableBody;
export class VirtualScrolling {
public scrollPosition?: number;
public itemHeight?: (data: any) => number | number;
public itemHeight?: ((data: any) => number) | number;
public tbodyHeight?: number;
}
{
"name": "ka-table",
"version": "2.3.1",
"version": "2.4.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "github:komarovalexander/ka-table",

@@ -121,4 +121,4 @@ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/komarovalexander/ka-table/blob/master/LICENSE)

| --- | --- | --- |
| childAttributes | <code>[ChildAttributes](#ChildAttributes)</code> | Object describes attributes for data grid child components [Events Demo](https://komarovalexander.github.io/ka-table/#/events) |
| columns | [<code>Column[]</code>](#Column) | Columns in table and their look and behaviour |
| childAttributes | <code>[ChildAttributes](#ChildAttributes)</code> | Object describes attributes for data grid child components [Events Demo](https://komarovalexander.github.io/ka-table/#/events) |
| data | <code>any\[\]</code> | The Table's data |

@@ -130,6 +130,7 @@ | dataRow | [<code>DataRowFunc</code>](#DataRowFunc) | Returns Data Row Template [Custom Data Row Example](https://komarovalexander.github.io/ka-table/#/custom-data-row |

| groups | [<code>Group[]</code>](#Group) | Group's in the table [Grouping Example](https://komarovalexander.github.io/ka-table/#/grouping) |
| groupsExpanded | <code>any[][]</code> | Groups that are expanded in the grid |
| noDataRow | <code>() => any</code> | The function returns string or a component which should appear when there are no data to show |
| onDataChange | <code>(data: any[]) => void</code> | This function is called each time when data going to change, use it to override current data [Editing Example](https://komarovalexander.github.io/ka-table/#/editing) |
| onEvent | <code>(type: string, data: any) => void</code> | Executes each time when dispatch is called [Events](https://komarovalexander.github.io/ka-table/#/events) |
| onOptionChange | <code>(value: any) => void</code> | This is mandatory function, this executes each time when grid going to change its state, use it to override current state [Example](https://komarovalexander.github.io/ka-table/#/editing) |
| onEvent | <code>(type: string, data: any) => void</code> | Executes each time when dispatch is called [Events](https://komarovalexander.github.io/ka-table/#/events) |
| groupsExpanded | <code>any[][]</code> | Groups that are expanded in the grid |
| rowKeyField | <code>string</code> | Data's field which is used to identify row |

@@ -141,3 +142,2 @@ | search <a name="Table.search"></a> | <code>string</code> | Specifies the text which are used for search by data [Search Example](https://komarovalexander.github.io/ka-table/#/search) |

<a name="Column"></a>

@@ -189,11 +189,11 @@ ### Column

| cell | <code>[ChildAttributesItem](#ChildAttributesItem)<[ICellContentProps](#ICellContentProps)></code> | Sets custom attributes for cell element |
| table | <code>[ChildAttributesItem](#ChildAttributesItem)<[Table](#Table)></code> | Sets custom attributes for table element |
| table | <code>[ChildAttributesItem](#ChildAttributesItem)<[Table](#ITableAllProps)></code> | Sets custom attributes for table element |
<a name="ChildAttributesItem"></a>
#### ChildAttributesItem
#### ChildAttributesItem&lt;T&gt;
This object is an extension for React HTMLAttributes. It contains all attributes and all [react Synthetic Events](https://reactjs.org/docs/events.html), but in each event it adds a second parameter which contains additional data with <code>[AttributeTableData type](#AttributeTableData)</code>.
<a name="AttributeTableData"></a>
#### AttributeTableData
#### AttributeTableData&lt;T&gt;
A second parameter in each [react Synthetic Event](https://reactjs.org/docs/events.html). Contains component-related information.

@@ -205,3 +205,3 @@

| childElementAttributes | <code>HTMLAttributes&lt;HTMLElement&gt;</code> | Default HTMLAttributes of the component |
| childProps | <code>any</code> | Props of the component |
| childProps | <code>T</code> | Props of the component |
| dispatch | <code>(type: string, data: any) => void</code> | Executes specific action with specific data |

@@ -208,0 +208,0 @@

@@ -32,4 +32,5 @@ import { PropsWithChildren } from 'react';

export type HeaderCellFuncPropsWithChildren = PropsWithChildren<IHeadCellProps>;
export type NoDataRowFunc = () => any;
export type OptionChangeFunc = (value: any) => void;
export type SearchFunc = (searchText?: string, rowData?: any, column?: Column) => boolean;
export type ValidationFunc = (value: any, rowData: any) => string | void;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc