mirror of
https://github.com/strapi/strapi.git
synced 2025-09-17 12:27:33 +00:00
attempt query get
This commit is contained in:
parent
c921626baf
commit
1ed526fe23
@ -59,6 +59,7 @@ export const BrowseStep = ({
|
|||||||
onChange={e => onChangeSearch(e.target.value)}
|
onChange={e => onChangeSearch(e.target.value)}
|
||||||
clearLabel="Clearing the asset search"
|
clearLabel="Clearing the asset search"
|
||||||
size="S"
|
size="S"
|
||||||
|
value={queryObject._q}
|
||||||
>
|
>
|
||||||
Searching for an asset
|
Searching for an asset
|
||||||
</Searchbar>
|
</Searchbar>
|
||||||
@ -105,6 +106,7 @@ BrowseStep.propTypes = {
|
|||||||
queryObject: PropTypes.shape({
|
queryObject: PropTypes.shape({
|
||||||
page: PropTypes.number.isRequired,
|
page: PropTypes.number.isRequired,
|
||||||
pageSize: PropTypes.number.isRequired,
|
pageSize: PropTypes.number.isRequired,
|
||||||
|
_q: PropTypes.string.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
pagination: PropTypes.shape({ pageCount: PropTypes.number.isRequired }).isRequired,
|
pagination: PropTypes.shape({ pageCount: PropTypes.number.isRequired }).isRequired,
|
||||||
selectedAssets: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
selectedAssets: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
||||||
|
@ -10,7 +10,7 @@ export const useModalAssets = ({ skipWhen, rawQuery }) => {
|
|||||||
const toggleNotification = useNotification();
|
const toggleNotification = useNotification();
|
||||||
const { notifyStatus } = useNotifyAT();
|
const { notifyStatus } = useNotifyAT();
|
||||||
const dataRequestURL = getRequestUrl('files');
|
const dataRequestURL = getRequestUrl('files');
|
||||||
|
console.log(rawQuery);
|
||||||
const getAssets = async () => {
|
const getAssets = async () => {
|
||||||
const { data } = await axiosInstance.get(`${dataRequestURL}?${rawQuery}`);
|
const { data } = await axiosInstance.get(`${dataRequestURL}?${rawQuery}`);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ const useModalQueryParams = () => {
|
|||||||
page: 1,
|
page: 1,
|
||||||
sort: 'updatedAt:DESC',
|
sort: 'updatedAt:DESC',
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
search: '',
|
_q: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleChangePageSize = pageSize => {
|
const handleChangePageSize = pageSize => {
|
||||||
@ -24,6 +24,7 @@ const useModalQueryParams = () => {
|
|||||||
|
|
||||||
const handleChangeSearch = value => {
|
const handleChangeSearch = value => {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
|
setQueryObject(prev => ({ ...prev, value }));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmitSearch = e => {
|
const handleSubmitSearch = e => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user