Revert "Enable column selection and sorting in DocumentsTab (with persistence) (#1881)" (#1960)

This reverts commit 7e95f5d8c8.
This commit is contained in:
Laurent Nguyen
2024-09-05 21:44:33 +02:00
committed by GitHub
parent 7e95f5d8c8
commit fe9730206e
14 changed files with 1332 additions and 742 deletions

View File

@@ -1,5 +1,3 @@
import { useEffect, useRef } from "react";
/**
* Utility class to help with selection.
* This emulates File Explorer selection behavior.
@@ -92,12 +90,3 @@ export const selectionHelper = (
}
}
};
// To get previous values of a state in useEffect
export const usePrevious = <T>(value: T): T | undefined => {
const ref = useRef<T>();
useEffect(() => {
ref.current = value;
});
return ref.current;
};