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

react-mkx-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-mkx-toolkit - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

13

dist/useRowSelection/index.js

@@ -7,6 +7,6 @@ "use strict";

const [selectedIds, setSelectedIds] = (0, react_1.useState)(initialSelectedIds);
const handleSelectRow = (id) => {
const onSelectRow = (id) => {
setSelectedIds((prev) => prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id]);
};
const handleSelectAllRow = () => {
const onSelectAllRow = () => {
if (selectedIds.length === (data === null || data === void 0 ? void 0 : data.length)) {

@@ -19,13 +19,8 @@ setSelectedIds([]);

};
const handleClearSelection = () => {
const onClearSelection = () => {
setSelectedIds([]);
};
return {
selectedIds,
handleSelectRow,
handleSelectAllRow,
handleClearSelection,
};
return { selectedIds, onSelectRow, onSelectAllRow, onClearSelection };
};
exports.useRowSelection = useRowSelection;
//# sourceMappingURL=index.js.map
{
"name": "react-mkx-toolkit",
"version": "1.1.8",
"version": "1.1.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -20,5 +20,5 @@ import { useState } from "react";

selectedIds: Array<string | number>;
handleSelectRow: (id: string | number) => void;
handleSelectAllRow: () => void;
handleClearSelection: () => void;
onSelectRow: (id: string | number) => void;
onSelectAllRow: () => void;
onClearSelection: () => void;
} => {

@@ -29,6 +29,6 @@ const [selectedIds, setSelectedIds] =

/**
* Function to handle selection of a row.
* Function to on selection of a row.
* @param id - Id of the row to be selected.
*/
const handleSelectRow = (id: string | number): void => {
const onSelectRow = (id: string | number): void => {
setSelectedIds((prev) =>

@@ -40,5 +40,5 @@ prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id]

/**
* Function to handle selection of all rows.
* Function to on selection of all rows.
*/
const handleSelectAllRow = (): void => {
const onSelectAllRow = (): void => {
if (selectedIds.length === data?.length) {

@@ -54,14 +54,9 @@ setSelectedIds([]);

*/
const handleClearSelection = (): void => {
const onClearSelection = (): void => {
setSelectedIds([]);
};
return {
selectedIds,
handleSelectRow,
handleSelectAllRow,
handleClearSelection,
};
return { selectedIds, onSelectRow, onSelectAllRow, onClearSelection };
};
export { useRowSelection };

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