Skip to content

Commit 5ed090e

Browse files
finish PR
1 parent 9e21dc1 commit 5ed090e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/data/material/components/autocomplete/CustomizedHook.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ function CustomAutocomplete(props) {
186186
<Label {...getInputLabelProps()}>Customized hook</Label>
187187
<InputWrapper ref={setAnchorEl} className={focused ? 'focused' : ''}>
188188
{value.map((option, index) => {
189-
const { key, ...tagProps } = getItemProps({ index });
189+
const { key, ...itemProps } = getItemProps({ index });
190190
return (
191191
<StyledItem
192192
key={key}
193-
{...tagProps}
193+
{...itemProps}
194194
label={props.getOptionLabel(option)}
195195
/>
196196
);

docs/data/material/components/autocomplete/CustomizedHook.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const Listbox = styled('ul')(({ theme }) => ({
164164
},
165165
}));
166166

167-
function CustomAutocomplete<Value = FilmOptionType>(
167+
function CustomAutocomplete<Value>(
168168
props: UseAutocompleteProps<Value, true, false, false>,
169169
) {
170170
const {
@@ -220,7 +220,7 @@ function CustomAutocomplete<Value = FilmOptionType>(
220220

221221
export default function CustomizedHook() {
222222
return (
223-
<CustomAutocomplete
223+
<CustomAutocomplete<FilmOptionType>
224224
id="customized-hook-demo"
225225
defaultValue={[top100Films[1]]}
226226
options={top100Films}

docs/data/material/components/autocomplete/CustomizedHook.tsx.preview

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<CustomAutocomplete
1+
<CustomAutocomplete<FilmOptionType>
22
id="customized-hook-demo"
33
defaultValue={[top100Films[1]]}
44
options={top100Films}

0 commit comments

Comments
 (0)