mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +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 { Flex, Padded } from '@buffetjs/core';
|
||||
import isEqual from 'react-fast-compare';
|
||||
import { stringify } from 'qs';
|
||||
import {
|
||||
PopUpWarning,
|
||||
request,
|
||||
@ -296,6 +297,7 @@ function ListView({
|
||||
emitEventRef.current('willCreateEntry', trackerProperty);
|
||||
push({
|
||||
pathname: `${pathname}/create`,
|
||||
search: query.pluginOptions ? stringify(query.pluginOptions, { encode: false }) : '',
|
||||
});
|
||||
},
|
||||
color: 'primary',
|
||||
@ -308,7 +310,7 @@ function ListView({
|
||||
},
|
||||
},
|
||||
];
|
||||
}, [label, pathname, canCreate, formatMessage, hasDraftAndPublish, push]);
|
||||
}, [label, pathname, canCreate, formatMessage, hasDraftAndPublish, push, query]);
|
||||
|
||||
const headerProps = useMemo(() => {
|
||||
/* eslint-disable indent */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user