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

@equinor/fusion

Package Overview
Dependencies
Maintainers
2
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion - npm Package Compare versions

Comparing version 0.1.80 to 0.1.81

6

lib/hooks/useSorting.d.ts
export declare type PropertyAccessorFunction<T> = (item: T) => string | null;
export declare type PropertyAccessor<T> = keyof T | PropertyAccessorFunction<T>;
export declare type SortDirection = "asc" | "desc";
export declare const applySorting: <T>(data: readonly T[], sortBy?: PropertyAccessorFunction<T> | keyof T | null, direction?: "desc" | "asc" | null) => readonly T[];
declare const _default: <T>(data: readonly T[], defaultSortBy?: PropertyAccessorFunction<T> | keyof T | null, defaultDirection?: "desc" | "asc" | null) => {
sortedData: readonly T[];
export declare const applySorting: <T>(data: T[], sortBy?: PropertyAccessorFunction<T> | keyof T | null, direction?: "desc" | "asc" | null) => T[];
declare const _default: <T>(data: T[], defaultSortBy?: PropertyAccessorFunction<T> | keyof T | null, defaultDirection?: "desc" | "asc" | null) => {
sortedData: T[];
sortBy: PropertyAccessorFunction<T> | keyof T | null;

@@ -8,0 +8,0 @@ direction: "desc" | "asc" | null;

@@ -97,4 +97,8 @@ import { useState, useEffect, useCallback } from "react";

const [pagination, setPagination] = useState(createPagination(0, perPage, currentPageIndex, padding));
useEffect(() => {
setPagedData([]);
setPagination(createPagination(pagination.totalCount, perPage, currentPageIndex, padding));
}, [currentPageIndex, perPage, ...deps]);
const abortable = withAbortController();
const applyPaginationAsync = () => {
useEffect(() => {
setIsFetching(true);

@@ -116,8 +120,3 @@ return abortable(async (signal) => {

});
};
useEffect(() => {
setPagedData([]);
setPagination(createPagination(pagination.totalCount, perPage, currentPageIndex, padding));
return applyPaginationAsync();
}, [currentPageIndex, perPage, ...deps]);
}, [pagination]);
const setCurrentPage = useCallback((index, perPage) => {

@@ -124,0 +123,0 @@ setCurrentPageIndex(index);

{
"name": "@equinor/fusion",
"version": "0.1.80",
"version": "0.1.81",
"description": "Everything a Fusion app needs to communicate with the core",

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

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