@secretstache/wordpress-gutenberg 0.6.10 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +972 -973
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DataQueryControls.jsx +2 -6
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import { arrayMove } from 'react-sortable-hoc';
|
|
|
10
10
|
import Select from 'react-select';
|
|
11
11
|
|
|
12
12
|
import { SortableSelectAsync } from './SortableSelect.jsx';
|
|
13
|
-
import { decodeHtmlEntities, loadSelectOptions } from '../utils/index.js';
|
|
13
|
+
import { decodeHtmlEntities, loadSelectOptions, useDefaultSelectOptions } from '../utils/index.js';
|
|
14
14
|
|
|
15
15
|
const DataQueryContext = createContext({});
|
|
16
16
|
|
|
@@ -192,11 +192,7 @@ const CuratedPosts = memo(({
|
|
|
192
192
|
return await loadSelectOptions(inputValue, postType);
|
|
193
193
|
}, []);
|
|
194
194
|
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
useEffect(() => {
|
|
198
|
-
loadSelectOptions('', postType).then(setDefaultPostsOptions);
|
|
199
|
-
}, []);
|
|
195
|
+
const { options: defaultPostsOptions } = useDefaultSelectOptions(postType);
|
|
200
196
|
|
|
201
197
|
const onSortEnd = useCallback(({ oldIndex, newIndex }) => {
|
|
202
198
|
const newCuratedPosts = arrayMove(curatedPosts, oldIndex, newIndex);
|