Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor fix to not require Base release
  • Loading branch information
DiegoAndai committed Jun 21, 2024
commit c3d2a5448512a1d639e570149061db3aba2e9a2f
4 changes: 2 additions & 2 deletions docs/pages/base-ui/api/use-autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
},
"getOptionProps": {
"type": {
"name": "(renderedOption: UseAutocompleteRenderedOption<Value>) => UseAutocompleteGetOptionPropsReturnValue",
"description": "(renderedOption: UseAutocompleteRenderedOption<Value>) => UseAutocompleteGetOptionPropsReturnValue"
"name": "(renderedOption: UseAutocompleteRenderedOption<Value>) => React.HTMLAttributes<HTMLLIElement> & { key: any }",
"description": "(renderedOption: UseAutocompleteRenderedOption<Value>) => React.HTMLAttributes<HTMLLIElement> & { key: any }"
},
"required": true
},
Expand Down
6 changes: 1 addition & 5 deletions packages/mui-base/src/useAutocomplete/useAutocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ export interface UseAutocompleteRenderedOption<Value> {
index: number;
}

export type UseAutocompleteGetOptionPropsReturnValue = React.HTMLAttributes<HTMLLIElement> & {
key: any;
};

export interface UseAutocompleteReturnValue<
Value,
Multiple extends boolean | undefined = false,
Expand Down Expand Up @@ -415,7 +411,7 @@ export interface UseAutocompleteReturnValue<
*/
getOptionProps: (
renderedOption: UseAutocompleteRenderedOption<Value>,
) => UseAutocompleteGetOptionPropsReturnValue;
) => React.HTMLAttributes<HTMLLIElement> & { key: any };
/**
* Id for the Autocomplete.
*/
Expand Down
3 changes: 1 addition & 2 deletions packages/mui-material/src/Autocomplete/Autocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
createFilterOptions,
UseAutocompleteProps,
AutocompleteFreeSoloValueMapping,
UseAutocompleteGetOptionPropsReturnValue,
} from '@mui/base';
import { IconButtonProps, InternalStandardProps as StandardProps, Theme } from '@mui/material';
import { ChipProps, ChipTypeMap } from '@mui/material/Chip';
Expand Down Expand Up @@ -326,7 +325,7 @@ export interface AutocompleteProps<
* @returns {ReactNode}
*/
renderOption?: (
props: UseAutocompleteGetOptionPropsReturnValue,
props: React.HTMLAttributes<HTMLLIElement> & { key: any },
option: Value,
state: AutocompleteRenderOptionState,
ownerState: AutocompleteOwnerState<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>,
Expand Down