Commit 82bf06e8 by jaymehta

pincode

1 parent e2e91aa2
......@@ -312,7 +312,10 @@ const ActivityDetails = ({ isUpdate }) => {
return;
}
let pincodeDataSet = await pincodeSearchByFilter(pin);
// console.log("pincodeData", pincodeDataSet.data.data);
console.log("pincodeDataSet.data.data", pincodeDataSet.data.data);
// if (pincodeDataSet.data.data.length > 0) {
// return { label: "no values available" };
// }
setPinCodeData(pincodeDataSet.data.data);
};
......@@ -342,7 +345,7 @@ const ActivityDetails = ({ isUpdate }) => {
// useEffect(() => {
// dispatch(updateActivityById(8))
// }, [])
console.log("pincodeData", pincodeData && pincodeData.length > 0);
console.log("activityById", activityById);
console.log("activityPeriodState", activityPeriodState);
return (
......@@ -585,11 +588,11 @@ const ActivityDetails = ({ isUpdate }) => {
id="basic-behaviors-example"
labelKey="name"
options={
pincodeData &&
pincodeData.length > 0 &&
pincodeData.map(item => {
return { name: item.attributes.name, id: item.id };
})
pincodeData && pincodeData.length > 0
? pincodeData.map(item => {
return { name: item.attributes.name, id: item.id };
})
: [{}]
}
placeholder="Choose a pincode"
ref={ref}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!