Skip to content

Commit

Permalink
[core] missingKeyGenerator do no longer exist (#40830)
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Tassinari <[email protected]>
Co-authored-by: Marija Najdova <[email protected]>
  • Loading branch information
oliviertassinari and mnajdova authored Jan 30, 2024
1 parent 84ceaf7 commit b842f94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packages/mui-base/src/useCompound/useCompoundItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface UseCompoundItemReturnValue<Key> {
/**
* The unique key for the child component.
* If the id was provided to `useCompoundItem`, this will be the same value.
* Otherwise, this will be a value generated by the `missingKeyGenerator`.
* Otherwise, this will be a value generated by the `id` function.
*/
id: Key | undefined;
/**
Expand All @@ -30,10 +30,9 @@ export interface UseCompoundItemReturnValue<Key> {
*
* @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).
* This can be either a value, or a function that generates a value based on already registered siblings' ids.
* @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.
* @param missingKeyGenerator A function that generates a unique id for the item.
* It is called with the set of the ids of all the items that have already been registered.
* If a function, it's called with the set of the ids of all the items that have already been registered.
* Return `existingKeys.size` if you want to use the index of the new item as the id.
* @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.
*
* @ignore - internal hook.
*/
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/useCompound/useCompoundParent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as React from 'react';
interface RegisterItemReturnValue<Key> {
/**
* The id of the item.
* If the `id` was `undefined`, an id from the `missingKeyGenerator` will be used.
*/
id: Key;
/**
Expand Down

0 comments on commit b842f94

Please sign in to comment.