mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 19:03:47 +00:00
refactor: stabilise filtering function
This commit is contained in:
committed by
Carlos Valente
parent
ef3d541eb3
commit
fc2e76db0a
@@ -65,6 +65,10 @@ export function useFlatRundownWithMetadata() {
|
||||
|
||||
/**
|
||||
* Provides access to a partial rundown based on a filter callback
|
||||
*
|
||||
* Callers MUST memoize the callback with useCallback to prevent
|
||||
* re-filtering on every render.
|
||||
*
|
||||
*/
|
||||
export function usePartialRundown(cb: (event: ExtendedEntry<OntimeEntry>) => boolean) {
|
||||
const { data, status } = useFlatRundownWithMetadata();
|
||||
|
||||
Reference in New Issue
Block a user