fix search initalvalues
This commit is contained in:
parent
63da1e7cee
commit
0350ef8c08
3 changed files with 9 additions and 7 deletions
|
|
@ -11,6 +11,7 @@ export default function ListQuestion({
|
|||
creator,
|
||||
downvotes,
|
||||
status,
|
||||
tags,
|
||||
text,
|
||||
title,
|
||||
upvotes,
|
||||
|
|
@ -19,17 +20,18 @@ export default function ListQuestion({
|
|||
}) {
|
||||
const sm = useMediaQuery((theme) => theme.breakpoints.only('sm'));
|
||||
const md = useMediaQuery((theme) => theme.breakpoints.only('md'));
|
||||
console.log(123123, tags)
|
||||
return (
|
||||
<span key={question_id}>
|
||||
<ListItem disablePadding>
|
||||
<Grid container>
|
||||
<Grid item xs={2}>
|
||||
<Stack justifyContent='center' sx={{ height: '100%' }}>
|
||||
{sm || md ? <ListQuestionInfo {...{upvotes, downvotes, answers, views, inline: false}}/> : null}
|
||||
{sm || md ? <ListQuestionInfo {...{ upvotes, downvotes, answers, views, inline: false }} /> : null}
|
||||
</Stack>
|
||||
</Grid>
|
||||
<Grid item xs={10}>
|
||||
{sm || md ? null: <ListQuestionInfo {...{upvotes, downvotes, answers, views, inline: true}}/>}
|
||||
{sm || md ? null : <ListQuestionInfo {...{ upvotes, downvotes, answers, views, inline: true }} />}
|
||||
<CreationInfoTag {...{ createdAt, creator }} />
|
||||
<Typography
|
||||
variant='h6'
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default function PaginatedList({ count, Component, data, handleChangePage
|
|||
<Component {...item} key={index} />
|
||||
))}
|
||||
{count > 1 && (
|
||||
<Box fullWidth display='flex' justifyContent='center' sx={{ margin: '1vh 0' }}>
|
||||
<Box display='flex' justifyContent='center' sx={{ margin: '1vh 0' }}>
|
||||
<Pagination
|
||||
count={count}
|
||||
onChange={handleChangePage}
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ export default function FormController({
|
|||
validate,
|
||||
validationSchema,
|
||||
children,
|
||||
initialValues
|
||||
initialValues = {}
|
||||
}) {
|
||||
|
||||
|
||||
|
||||
const { setContent } = useForm();
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setContent('');
|
||||
|
||||
|
||||
}, [setContent]);
|
||||
|
||||
const handleChange = (e) => {
|
||||
|
|
|
|||
Reference in a new issue