This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
Search component does not accept static options Array in autocomplete #6061
Closed
tomalec opened this issue
Jan 13, 2021
· 1 comment
· Fixed by #6884 · May be fixed by woocommerce/google-listings-and-ads#643
Closed
Search component does not accept static options Array in autocomplete #6061
tomalec opened this issue
Jan 13, 2021
· 1 comment
· Fixed by #6884 · May be fixed by woocommerce/google-listings-and-ads#643
Labels
focus: components
Issues for woocommerce components
needs: author feedback
The issue/PR needs a response from any of the parties involved in the issue.
type: bug
The issue is a confirmed bug.
Comments
tomalec
added
type: question
The issue is a question about how code works.
focus: components
Issues for woocommerce components
type: documentation
This issue is a request for better documentation.
needs: documentation
The issue/PR requires documentation to be added.
labels
Jan 13, 2021
6 tasks
tomalec
added a commit
to woocommerce/google-listings-and-ads
that referenced
this issue
Jan 13, 2021
Move filter configuration to a separate file. Subfilter is still not functional due to issues with Search autocomplete config: - woocommerce/woocommerce-admin#6061 - woocommerce/woocommerce-admin#6062
1 task
adrianduffell
added
type: bug
The issue is a confirmed bug.
and removed
needs: documentation
The issue/PR requires documentation to be added.
type: documentation
This issue is a request for better documentation.
type: question
The issue is a question about how code works.
labels
Feb 8, 2021
@tomalec this looks like a bug. I think it would be better to support all of the valid type of Are you interested in creating a PR for this? |
adrianduffell
added
the
needs: author feedback
The issue/PR needs a response from any of the parties involved in the issue.
label
Feb 9, 2021
This was referenced Apr 21, 2021
tomalec
added a commit
that referenced
this issue
Apr 26, 2021
This was referenced Apr 26, 2021
tomalec
added a commit
that referenced
this issue
May 3, 2021
Co-authored-by: Jeff Stieler <[email protected]> Make `Search` component accept `autocompleter.options` that meet the requirements stated in [the docs](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/autocomplete#options): > May be an array, a function that returns an array, or a function that returns a promise for an array. Fixes #6061.
tomalec
added a commit
to woocommerce/google-listings-and-ads
that referenced
this issue
May 20, 2021
as `Search` fix woocommerce/woocommerce-admin#6061 was released.
ObliviousHarmony
pushed a commit
to woocommerce/woocommerce
that referenced
this issue
Mar 18, 2022
…mmerce-admin#6884) Co-authored-by: Jeff Stieler <[email protected]> Make `Search` component accept `autocompleter.options` that meet the requirements stated in [the docs](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/autocomplete#options): > May be an array, a function that returns an array, or a function that returns a promise for an array. Fixes woocommerce/woocommerce-admin#6061.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
focus: components
Issues for woocommerce components
needs: author feedback
The issue/PR needs a response from any of the parties involved in the issue.
type: bug
The issue is a confirmed bug.
Describe the bug
I'm not 100% sure whether it's a bug, the desired behavior, or just out-dated docs.
I'm trying to set up a
Search
component (actually aFilterPicker
withSearch
inside), with a customtype
.The wc-component docs says that I need to provide an
autocompleter
and links to Gutenberg's docs defining the interfaceWhich states that
options
should be "Type:Array|Function
".When I provide an Array, it throws with
https://github.com/woocommerce/woocommerce-admin/blob/main/packages/components/src/search/index.js#L112
Obviously expect a function that returns a promise.
To Reproduce
Steps to reproduce the behavior:
<Search>
with custom type and Array in autocomplete options, like the one given in docs example:Expected behavior
The component should be rendered.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: