From 15c341f97ac0b1e4684cec0d0c6a37c560c6cfb2 Mon Sep 17 00:00:00 2001 From: KhadijaMahanga Date: Tue, 10 Mar 2020 16:20:13 +0300 Subject: [PATCH] fix snippet select --- .../plugins/hurumap/src/CardBlock/Edit.js | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/wp-content/plugins/hurumap/src/CardBlock/Edit.js b/wp-content/plugins/hurumap/src/CardBlock/Edit.js index 173a07eb..80a9ccf5 100644 --- a/wp-content/plugins/hurumap/src/CardBlock/Edit.js +++ b/wp-content/plugins/hurumap/src/CardBlock/Edit.js @@ -5,8 +5,10 @@ import { PanelBody, SelectControl, TextControl } from '@wordpress/components'; import { InspectorControls } from '@wordpress/editor'; import Card from '@codeforafrica/hurumap-ui/components/Card'; +import { InputLabel } from '@material-ui/core'; import { select } from '@wordpress/data'; +import Select from 'react-select'; import shortid from 'shortid'; import withRoot from '../withRoot'; import propTypes from '../propTypes'; @@ -51,7 +53,9 @@ function Edit({ let result; function getRecord() { setTimeout(() => { - result = getEntityRecord('postType', propPostType, propPostId); + result = getEntityRecord('postType', propPostType, propPostId, { + per_page: -1 + }); if (!result) { getRecord(); } else { @@ -87,18 +91,13 @@ function Edit({ value={postType} onChange={setPostType} /> - ({ - value: p.id, - label: p.title.rendered - })) - ]} + Post +