Skip to main content

Interface: UseSparePartsReturn

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

Properties​

childMachines​

childMachines: SparePartsMachine[]

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

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


currentPage​

currentPage: number

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

Current page (1-based).


displayParts​

displayParts: SparePart[]

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

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


fetchParts​

fetchParts: () => Promise<void>

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

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

Returns​

Promise<void>


goToPage​

goToPage: (page) => void

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

Navigate to a page.

Parameters​

page​

number

Returns​

void


isLoading​

isLoading: boolean

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

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


itemsFound​

itemsFound: number

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

Total parts found.


notFound​

notFound: boolean

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

The slug resolved in none of the candidate languages.

Distinct from "resolved but has no parts": this node does not exist, and a host that renders the usual empty listing for it shows a page built entirely from the URL. Always false in controlled mode.


totalPages​

totalPages: number

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

Total pages.