mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-26 22:46:53 -04:00
Refactor Movie index to use react-window
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';
|
||||
import {
|
||||
default as useMeasureHook,
|
||||
Options,
|
||||
RectReadOnly,
|
||||
} from 'react-use-measure';
|
||||
|
||||
const ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill;
|
||||
|
||||
export type Measurements = RectReadOnly;
|
||||
|
||||
function useMeasure(
|
||||
options?: Omit<Options, 'polyfill'>
|
||||
): ReturnType<typeof useMeasureHook> {
|
||||
return useMeasureHook({
|
||||
polyfill: ResizeObserver,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
export default useMeasure;
|
||||
@@ -0,0 +1,8 @@
|
||||
enum ScrollDirection {
|
||||
Horizontal = 'horizontal',
|
||||
Vertical = 'vertical',
|
||||
None = 'none',
|
||||
Both = 'both',
|
||||
}
|
||||
|
||||
export default ScrollDirection;
|
||||
@@ -0,0 +1,6 @@
|
||||
enum SortDirection {
|
||||
Ascending = 'ascending',
|
||||
Descending = 'descending',
|
||||
}
|
||||
|
||||
export default SortDirection;
|
||||
Reference in New Issue
Block a user