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)}
|
||||
clearLabel="Clearing the asset search"
|
||||
size="S"
|
||||
value={queryObject._q}
|
||||
>
|
||||
Searching for an asset
|
||||
</Searchbar>
|
||||
@ -105,6 +106,7 @@ BrowseStep.propTypes = {
|
||||
queryObject: PropTypes.shape({
|
||||
page: PropTypes.number.isRequired,
|
||||
pageSize: PropTypes.number.isRequired,
|
||||
_q: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
pagination: PropTypes.shape({ pageCount: PropTypes.number.isRequired }).isRequired,
|
||||
selectedAssets: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
|
||||
|
@ -10,7 +10,7 @@ export const useModalAssets = ({ skipWhen, rawQuery }) => {
|
||||
const toggleNotification = useNotification();
|
||||
const { notifyStatus } = useNotifyAT();
|
||||
const dataRequestURL = getRequestUrl('files');
|
||||
|
||||
console.log(rawQuery);
|
||||
const getAssets = async () => {
|
||||
const { data } = await axiosInstance.get(`${dataRequestURL}?${rawQuery}`);
|
||||
|
||||
|
@ -7,7 +7,7 @@ const useModalQueryParams = () => {
|
||||
page: 1,
|
||||
sort: 'updatedAt:DESC',
|
||||
pageSize: 10,
|
||||
search: '',
|
||||
_q: '',
|
||||
});
|
||||
|
||||
const handleChangePageSize = pageSize => {
|
||||
@ -24,6 +24,7 @@ const useModalQueryParams = () => {
|
||||
|
||||
const handleChangeSearch = value => {
|
||||
console.log(value);
|
||||
setQueryObject(prev => ({ ...prev, value }));
|
||||
};
|
||||
|
||||
const handleSubmitSearch = e => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user