mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
chore: backport fix for relation search (#19070)
This commit is contained in:
parent
c469b9f446
commit
5404b0b69b
@ -159,7 +159,7 @@ const RelationInput = ({
|
||||
|
||||
const handleMenuOpen = (isOpen) => {
|
||||
if (isOpen) {
|
||||
onSearch();
|
||||
onSearch(textValue);
|
||||
}
|
||||
};
|
||||
|
||||
@ -221,7 +221,7 @@ const RelationInput = ({
|
||||
<ComboboxWrapper marginRight="auto" maxWidth={size <= 6 ? '100%' : '70%'} width="100%">
|
||||
<Combobox
|
||||
ref={fieldRef}
|
||||
autocomplete="list"
|
||||
autocomplete="none"
|
||||
error={error}
|
||||
name={name}
|
||||
hint={description}
|
||||
|
||||
@ -688,7 +688,7 @@ exports[`Content-Manager || RelationInput should render and match snapshot 1`] =
|
||||
class="c10 c11"
|
||||
>
|
||||
<input
|
||||
aria-autocomplete="list"
|
||||
aria-autocomplete="none"
|
||||
aria-controls="radix-:r4:"
|
||||
aria-describedby="1-hint 1-error"
|
||||
aria-disabled="false"
|
||||
|
||||
@ -257,7 +257,7 @@ describe('useRelation', () => {
|
||||
});
|
||||
|
||||
expect(spy).toBeCalledWith('/', {
|
||||
params: { _q: 'something', _filter: '$startsWithi', limit: 10, page: 1 },
|
||||
params: { _q: 'something', _filter: '$containsi', limit: 10, page: 1 },
|
||||
});
|
||||
});
|
||||
|
||||
@ -284,7 +284,7 @@ describe('useRelation', () => {
|
||||
expect(spy).toBeCalledWith(expect.any(String), {
|
||||
params: {
|
||||
_q: 'something',
|
||||
_filter: '$startsWithi',
|
||||
_filter: '$containsi',
|
||||
limit: 5,
|
||||
page: expect.any(Number),
|
||||
},
|
||||
@ -316,7 +316,7 @@ describe('useRelation', () => {
|
||||
expect(spy).toHaveBeenNthCalledWith(1, expect.any(String), {
|
||||
params: {
|
||||
_q: 'something',
|
||||
_filter: '$startsWithi',
|
||||
_filter: '$containsi',
|
||||
limit: expect.any(Number),
|
||||
page: 1,
|
||||
},
|
||||
@ -324,7 +324,7 @@ describe('useRelation', () => {
|
||||
expect(spy).toHaveBeenNthCalledWith(2, expect.any(String), {
|
||||
params: {
|
||||
_q: 'something',
|
||||
_filter: '$startsWithi',
|
||||
_filter: '$containsi',
|
||||
limit: expect.any(Number),
|
||||
page: 2,
|
||||
},
|
||||
|
||||
@ -166,7 +166,7 @@ export const useRelation = (cacheKey, { relation, search }) => {
|
||||
setSearchParams({
|
||||
...options,
|
||||
_q: term,
|
||||
_filter: '$startsWithi',
|
||||
_filter: '$containsi',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user