4efd2123a3
* Update woocommerce.com URLs in documentation and code files
* Add changelog
* Fix github repository link in extend-rest-api-add-custom-fields.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add github reporter (#42974)
* Add github reporter
* Add changelog
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Fix product task redirect to support grouped and external products (#43051)
* Rearrange product redirection logic to better accept grouped and external produc types
* Add changelog
* Modify feedback modal actions (#43005)
* Adapt feedback modal actions
* Add changelogs
* Modify comments
* Fix tests
* Fix test
* Update class-wc-gateway-bacs.php (#43054)
* Update class-wc-gateway-bacs.php
Fix typo in textdomain
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* [Product Block Editor]: Add `Linked product` tab (#43009)
* add linked-products to group IDs
* add Linked Products tab
* tweak hideConditions condition
* changelog
* fix typo in doc comment
* Introduce a product type selection within the new experience (#41823)
* Create a relation between the product type and the product block template
* Add 'patterns' to name the kind of products that can be created for a specific template
* Resolve template using its id as a template query param
* Rename ProductEditPattern to ProductTemplate
* Rename get_patterns hook to woocommerce_product_editor_get_product_templates
* Return the list of templates to the client
* Set layout template events as array
* Register the layout template based on the product template or the post type in case of product variations
* Registering non supported product types
* Create and register the woocommerce/product-details-section-description block
* Add the product type to the section description
* Create product type selector
* Fix menu item style
* Highlight selected menu item
* Set the selected product template
* Set product template title to lowercase in the content description
* Rename blocks by blockTemplates under the AbstractBlockTemplate class
* Rename to woocommerce_product_editor_product_templates filter
* Remove product_template_ prefix from the supported_product_types map
* Rename get_formatted to to_JSON and convert the props to client side like
* Refactor get_product_templates
* Fix icon resolution
* Add a confirmation modal for unsupported product templates
* Add changelog files
* Remove product types using for testing
* Fix redirection when changing to a non supported product template
* Set the change button state to busy when it is saving the product
* Fix php linter errors
* Fix rebase conflict
* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace
* Add the to_json definition to the BlockTemplateInterface
* Create default product template by custom product type if it does not have a template associated yet
* Fix some comments and product template creation validation
* Add support to load the product template icon from an external resource
* Fix php linter
* Fix the changelog description
* [Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981)
---------
Co-authored-by: David Arenas <david.arenas@automattic.com>
* Introduce the transient files engine (#42877)
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Change marketplace install API request to POST instead of GET (#43033)
* Change marketplace install API to using POST instead of GET
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Prep trunk for 8.6 cycle (#43021)
Prep trunk for 8.6 cycle with version bump to 8.6.0-dev
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903)
* Remove Reviews blocks Puppeteer tests
* Minor code cleanup
* Typos
* Create publishAndVisitPost() editor util
* Fix subcategories when importing products in Playwright and add reviews
* Add Reviews blocks tests in Playwright
* More typos
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Create a 'reviews' object in data.ts so we can store reviews data in one single place
* Update test so instead of creating a new post in each test, we go to the already-created post
* Add source comments to reviews data to match it with the script
---------
Co-authored-by: github-actions <github-actions@github.com>
* Release: Remove 8.5 change files (#43022)
Delete changelog files from 8.5 release
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
* Delete changelog files based on PR 43033 (#43079)
Delete changelog files for 43033
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Delete changelog files based on PR 43051 (#43081)
Delete changelog files for 43051
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
* Interactive Price Filter: use `context` instead of `state` (#42980)
* feat: use context instead of state
* fix: temporary move the context to inner element for diffing to work
* fix: update context before navigation for optimistic UI
* Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040)
Co-authored-by: github-actions <github-actions@github.com>
* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074)
* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "Fix schedule sales error" (#43094)
Revert "Fix schedule sales error (#42700)"
This reverts commit
|
||
---|---|---|
.. | ||
test | ||
README.md | ||
index.ts | ||
item.tsx | ||
search-list-control.tsx | ||
style.scss | ||
types.ts | ||
utils.tsx |
README.md
SearchListControl
Table of contents
Component to display a searchable, selectable list of items.
Usage
<SearchListControl
list={ list }
isLoading={ loading }
selected={ selected }
onChange={ ( items ) => setState( { selected: items } ) }
/>
Props
Name | Type | Default | Description |
---|---|---|---|
className |
String | null |
Additional CSS classes |
isHierarchical |
Boolean | null |
Whether the list of items is hierarchical or not. If true, each list item is expected to have a parent property |
isLoading |
Boolean | null |
Whether the list of items is still loading |
isSingle |
Boolean | null |
Restrict selections to one item |
list |
Array | null |
A complete list of item objects, each with id, name properties. This is displayed as a clickable/keyboard-able list, and possibly filtered by the search term (searches name) |
messages |
Object | null |
Messages displayed or read to the user. Configure these to reflect your object type. See defaultMessages above for examples |
onChange |
Function | null |
(required) Callback fired when selected items change, whether added, cleared, or removed. Passed an array of item objects (as passed in via props.list) |
onSearch |
Function | null |
Callback fired when the search field is used |
renderItem |
Function | null |
Callback to render each item in the selection list, allows any custom object-type rendering |
selected |
Array | null |
(required) The list of currently selected items |
search |
String | null |
|
setState |
Function | null |
|
debouncedSpeak |
Function | null |
|
instanceId |
Number | null |
list
item structure
id
: Numbername
: String
messages
object structure
clear
: String - A more detailed label for the "Clear all" button, read to screen reader users.list
: String - Label for the list of selectable items, only read to screen reader users.noItems
: String - Message to display when the list is empty (implies nothing loaded from the server or parent component).noResults
: String - Message to display when no matching results are found. %s is the search term.search
: String - Label for the search inputselected
: Function - Label for the selected items. This is actually a function, so that we can pass through the count of currently selected items.updated
: String - Label indicating that search results have changed, read to screen reader users.
SearchListItem
Usage
Used implicitly by SearchListControl
when the renderItem
prop is omitted.
Props
Name | Type | Default | Description |
---|---|---|---|
className |
String | null |
Additional CSS classes |
countLabel |
ReactNode | null |
Label to display in the count bubble. Takes preference over item.count . |
depth |
Number | 0 |
Depth, non-zero if the list is hierarchical |
item |
Object | null |
Current item to display |
isSelected |
Boolean | null |
Whether this item is selected |
isSingle |
Boolean | null |
Whether this should only display a single item (controls radio vs checkbox icon) |
onSelect |
Function | null |
Callback for selecting the item |
search |
String | '' |
Search string, used to highlight the substring in the item name |
We're hiring! Come work with us!
🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.