File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
pwa/components/admin/review Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,20 @@ import {
6
6
import Rating , { type RatingProps } from "@mui/material/Rating" ;
7
7
8
8
export type RatingInputProps = RatingProps &
9
- Omit < CommonInputProps , "source" > &
9
+ CommonInputProps &
10
10
Omit < ResettableTextFieldProps , "label" | "helperText" > ;
11
11
12
12
export const RatingInput = ( props : RatingInputProps ) => {
13
13
const {
14
14
field : { ref, ...field } ,
15
- } = useInput ( { ... props , source : "rating" } ) ;
15
+ } = useInput ( props ) ;
16
16
const value = Number ( field . value ) ;
17
17
// Error with "helperText" and "validate" props: remove them from the Rating component
18
18
const { helperText, validate, ...rest } = props ;
19
19
20
20
return (
21
21
< Labeled label = "Rating" >
22
- < Rating { ...rest } { ...field } size = "medium" value = { value } />
22
+ < Rating { ...rest } { ...field } value = { value } />
23
23
</ Labeled >
24
24
) ;
25
25
} ;
Original file line number Diff line number Diff line change @@ -36,6 +36,6 @@ export const ReviewsEdit = () => (
36
36
source = "body"
37
37
style = { { width : 500 } }
38
38
/>
39
- < RatingInput validate = { required ( ) } style = { { width : 500 } } />
39
+ < RatingInput name = "rating" validate = { required ( ) } source = "rating" size = "medium" style = { { width : 500 } } />
40
40
</ EditGuesser >
41
41
) ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const filters = [
49
49
style = { { width : 300 } }
50
50
/>
51
51
</ ReferenceInput > ,
52
- < RatingInput key = "rating" /> ,
52
+ < RatingInput name = "rating" source = "rating" key = "rating" size = "medium " /> ,
53
53
] ;
54
54
55
55
export const ReviewsList = ( ) => (
You can’t perform that action at this time.
0 commit comments