Skip to content

Commit b842f94

Browse files
[core] missingKeyGenerator do no longer exist (#40830)
Signed-off-by: Olivier Tassinari <[email protected]> Co-authored-by: Marija Najdova <[email protected]>
1 parent 84ceaf7 commit b842f94

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/mui-base/src/useCompound/useCompoundItem.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface UseCompoundItemReturnValue<Key> {
1111
/**
1212
* The unique key for the child component.
1313
* If the id was provided to `useCompoundItem`, this will be the same value.
14-
* Otherwise, this will be a value generated by the `missingKeyGenerator`.
14+
* Otherwise, this will be a value generated by the `id` function.
1515
*/
1616
id: Key | undefined;
1717
/**
@@ -30,10 +30,9 @@ export interface UseCompoundItemReturnValue<Key> {
3030
*
3131
* @param id A unique key for the child component. If the `id` is `undefined`, the registration logic will not run (this can sometimes be the case during SSR).
3232
* This can be either a value, or a function that generates a value based on already registered siblings' ids.
33-
* @param itemMetadata Arbitrary metadata to pass to the parent component. This should be a stable reference (e.g. a memoized object), to avoid unnecessary re-registrations.
34-
* @param missingKeyGenerator A function that generates a unique id for the item.
35-
* It is called with the set of the ids of all the items that have already been registered.
33+
* If a function, it's called with the set of the ids of all the items that have already been registered.
3634
* Return `existingKeys.size` if you want to use the index of the new item as the id.
35+
* @param itemMetadata Arbitrary metadata to pass to the parent component. This should be a stable reference (e.g. a memoized object), to avoid unnecessary re-registrations.
3736
*
3837
* @ignore - internal hook.
3938
*/

packages/mui-base/src/useCompound/useCompoundParent.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as React from 'react';
44
interface RegisterItemReturnValue<Key> {
55
/**
66
* The id of the item.
7-
* If the `id` was `undefined`, an id from the `missingKeyGenerator` will be used.
87
*/
98
id: Key;
109
/**

0 commit comments

Comments
 (0)