Skip to content

Commit d0a8133

Browse files
committed
Added SortablePostSearchControl component.
1 parent 256e704 commit d0a8133

File tree

11 files changed

+253
-6972
lines changed

11 files changed

+253
-6972
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,31 @@ Select and sort multiple posts, with search filtering. Takes an array of post ob
101101
/>
102102
```
103103

104+
### SortablePostSearchControl
105+
106+
Select and sort multiple posts, by searching from a large pool of posts. Takes an array of post ids as value and returns the same on change.
107+
108+
![SortablePostsControl example](assets/SortablePostsControl-screenshot-01.png)
109+
110+
```javascript
111+
<SortablePostSearchControl
112+
type="page"
113+
label="Choose pages"
114+
placeholder="Search here"
115+
value={mySelectedPageIds}
116+
onChange={(value) =>
117+
setAttributes({
118+
mySelectedPageIds: value,
119+
})
120+
}
121+
numOfInitialResults={20}
122+
filterResults={(results) => {
123+
// You can modify the search results before returning them.
124+
return results;
125+
}}
126+
/>
127+
```
128+
104129
### TaxonomyControl
105130

106131
Similar to the default WordPress category selector, shows a filterable list of checkboxes.
@@ -161,6 +186,11 @@ const loremIpsumStories = usePostSearch({
161186

162187
## Changelog
163188

189+
### 6.1.0
190+
191+
- Refactored the way textdomain is used and removed config.json.
192+
- Introduced `SortablePostSearchControl`.
193+
164194
### 6.0.0
165195

166196
- Updated npm dependencies

build/index-rtl.css

Lines changed: 1 addition & 238 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '6e070825a2fb1fe9feb8');
1+
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '4e6cf2fb03a0956fac5e');

0 commit comments

Comments
 (0)