mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 18:19:34 +00:00
Persist pluginOptions search
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
9a510f4e1f
commit
659c85923a
@ -8,6 +8,7 @@ import { useHistory, useLocation } from 'react-router-dom';
|
|||||||
import { Header } from '@buffetjs/custom';
|
import { Header } from '@buffetjs/custom';
|
||||||
import { Flex, Padded } from '@buffetjs/core';
|
import { Flex, Padded } from '@buffetjs/core';
|
||||||
import isEqual from 'react-fast-compare';
|
import isEqual from 'react-fast-compare';
|
||||||
|
import { stringify } from 'qs';
|
||||||
import {
|
import {
|
||||||
PopUpWarning,
|
PopUpWarning,
|
||||||
request,
|
request,
|
||||||
@ -296,6 +297,7 @@ function ListView({
|
|||||||
emitEventRef.current('willCreateEntry', trackerProperty);
|
emitEventRef.current('willCreateEntry', trackerProperty);
|
||||||
push({
|
push({
|
||||||
pathname: `${pathname}/create`,
|
pathname: `${pathname}/create`,
|
||||||
|
search: query.pluginOptions ? stringify(query.pluginOptions, { encode: false }) : '',
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
@ -308,7 +310,7 @@ function ListView({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}, [label, pathname, canCreate, formatMessage, hasDraftAndPublish, push]);
|
}, [label, pathname, canCreate, formatMessage, hasDraftAndPublish, push, query]);
|
||||||
|
|
||||||
const headerProps = useMemo(() => {
|
const headerProps = useMemo(() => {
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user