import { Item } from '@workday/canvas-kit-react/collection';
/**
* This elemProps hook allows for children values to be considered identifiers if the children are
* strings. This can be useful for autocomplete or select components that allow string values. This
* hook must be passed _after_ {@link useListItemRegister} because this hook sets the `data-id`
* attribute if one hasn't been defined by the application.
*
* An example might look like:
*
* ```tsx
* const useMyListItem = composeHooks(
* // any other hooks here
* useListItemSelect,
* useListItemRegister,
* useListItemAllowChildStrings // always the last in the list
* )
*
*
* {
* console.log(id) // will be "First" or "Second"
* }}>
* First
* Second
*
* ```
*/
export declare const useListItemAllowChildStrings: import("@workday/canvas-kit-react/common").BehaviorHook<{
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: Item[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("react").SyntheticEvent | undefined;
}): void;
goTo(data: {
id: string;
}): void;
goToNext(): void;
goToPrevious(): void;
goToPreviousRow(): void;
goToNextRow(): void;
goToFirst(): void;
goToLast(): void;
goToFirstOfRow(): void;
goToLastOfRow(): void;
goToNextPage(): void;
goToPreviousPage(): void;
registerItem(data: {
id: string;
textValue: string;
}): void;
unregisterItem(data: {
id: string;
}): void;
updateItemHeight(data: {
value: number;
}): void;
};
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
UNSTABLE_parentModel: {
state: {
selectedIds: string[] | "all";
unselectedIds: string[];
cursorId: string | string[];
columnCount: number;
pageSizeRef: import("react").MutableRefObject;
cursorIndexRef: {
readonly current: number;
};
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer;
UNSTABLE_defaultItemHeight: number;
containerRef: import("react").RefObject;
id: string;
orientation: "horizontal" | "vertical";
indexRef: import("react").MutableRefObject;
nonInteractiveIds: string[];
isVirtualized: boolean;
items: Item[];
};
events: {
select(data: {
id: string;
}): void;
selectAll(): void;
unselectAll(): void;
setSelectedIds(ids: string[] | "all"): void;
remove(data: {
id: string;
nextId?: string | undefined;
event?: Event | import("react").SyntheticEvent | undefined;
}): void;
goTo(data: {
id: string;
}): void;
goToNext(): void;
goToPrevious(): void;
goToPreviousRow(): void;
goToNextRow(): void;
goToFirst(): void;
goToLast(): void;
goToFirstOfRow(): void;
goToLastOfRow(): void;
goToNextPage(): void;
goToPreviousPage(): void;
registerItem(data: {
id: string;
textValue: string;
}): void;
unregisterItem(data: {
id: string;
}): void;
updateItemHeight(data: {
value: number;
}): void;
};
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
getId: (item: any) => string;
getTextValue: (item: any) => string;
} | undefined;
}, {
'data-id'?: string | undefined;
}>;
//# sourceMappingURL=useListItemAllowChildStrings.d.ts.map