Commit d060bd5 1 parent d98976c commit d060bd5 Copy full SHA for d060bd5
File tree 1 file changed +6
-18
lines changed
test/regressions/fixtures/Autocomplete
1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,6 @@ export default function Sizes() {
80
80
getOptionLabel = { ( option ) => option . title }
81
81
defaultValue = { movies [ 0 ] }
82
82
disableClearable
83
- renderTags = { ( value , getTagProps ) =>
84
- value . map ( ( option , index ) => (
85
- < Chip
86
- variant = "outlined"
87
- label = { option . title }
88
- size = "small"
89
- { ...getTagProps ( { index } ) }
90
- />
91
- ) )
92
- }
93
83
renderInput = { ( params ) => (
94
84
< TextField { ...params } variant = "filled" label = "Movies" placeholder = "Favorites" />
95
85
) }
@@ -103,14 +93,12 @@ export default function Sizes() {
103
93
defaultValue = { [ movies [ 0 ] ] }
104
94
disableClearable
105
95
renderTags = { ( value , getTagProps ) =>
106
- value . map ( ( option , index ) => (
107
- < Chip
108
- variant = "outlined"
109
- label = { option . title }
110
- size = "small"
111
- { ...getTagProps ( { index } ) }
112
- />
113
- ) )
96
+ value . map ( ( option , index ) => {
97
+ const { key, ...other } = getTagProps ( { index } ) ;
98
+ return (
99
+ < Chip key = { key } variant = "outlined" label = { option . title } size = "small" { ...other } />
100
+ ) ;
101
+ } )
114
102
}
115
103
renderInput = { ( params ) => (
116
104
< TextField { ...params } variant = "filled" label = "Movies" placeholder = "Favorites" />
You can’t perform that action at this time.
0 commit comments