Skip to main content

Interface: UseSparePartsReturn

Defined in: composables/react/useSpareParts.ts:134

Properties

childMachines

childMachines: SparePartsMachine[]

Defined in: composables/react/useSpareParts.ts:138

Child machines of this node, for rendering alongside the parts.


currentPage

currentPage: number

Defined in: composables/react/useSpareParts.ts:144

Current page (1-based).


displayParts

displayParts: SparePart[]

Defined in: composables/react/useSpareParts.ts:136

The parts to render — the controlled prop when set, else the fetched list.


fetchParts

fetchParts: () => Promise<void>

Defined in: composables/react/useSpareParts.ts:148

Re-run the fetch. No-op in controlled mode.

Returns

Promise<void>


goToPage

goToPage: (page) => void

Defined in: composables/react/useSpareParts.ts:150

Navigate to a page.

Parameters

page

number

Returns

void


isLoading

isLoading: boolean

Defined in: composables/react/useSpareParts.ts:142

true while an internal fetch is in flight. Always false when controlled.


itemsFound

itemsFound: number

Defined in: composables/react/useSpareParts.ts:140

Total parts found.


totalPages

totalPages: number

Defined in: composables/react/useSpareParts.ts:146

Total pages.