(typeof option === 'string' ? option : option.description)}
// filterOptions={(x) => x}
// options={options}
// // options={pickCust}
// autoComplete
// includeInputInList
// filterSelectedOptions
// value={value}
// // value={pickCust.address}
// noOptionsText="No locations"
// onChange={(event, newValue, reason) => {
// if (reason == 'clear') {
// setValue(null);
// }
// console.log('pick location', newValue);
// // setOptions(newValue ? [newValue, ...options] : options);
// setValue(newValue);
// setAddress(newValue.description);
// setPickCust({ ...pickCust, address: newValue.description });
// }}
// onInputChange={(event, newInputValue) => {
// setInputValue(newInputValue);
// }}
// renderInput={(params) => }
// renderOption={(props, option) => {
// const matches = option.structured_formatting.main_text_matched_substrings || [];
// const parts = parse(
// option.structured_formatting.main_text,
// matches.map((match) => [match.offset, match.offset + match.length])
// );
// return (
//
//
//
//
//
//
// {parts.map((part, index) => (
//
// {part.text}
//
// ))}
//
// {option.structured_formatting.secondary_text}
//
//
//
//
// );
// }}
// />
setInputValue2(e.target.value)}
InputProps={{
endAdornment: (
{
setInputValue2('');
setPickCust({
...pickCust,
doorno: '',
suburb: '',
city: '',
postcode: '',
landmark: ''
});
setShowDistance(false);
setStartPoint({ latitude: 0, longitude: 0 });
}}
size="small"
>
)
}}
/>
) : (
{
setAddId1(0);
setPickCust({
...pickCust,
firstname: '',
contactno: '',
doorno: '',
suburb: '',
city: '',
postcode: '',
landmark: ''
});
setShowDistance(false);
setStartPoint({ latitude: 0, longitude: 0 });
}}
>
)
}}
variant="outlined"
placeholder="Select"
value={pickCust.address}
onChange={(e) => {
setPickCust({ ...pickCust, address: e.target.value });
if (e.target.value == '') {
setAddId1(0);
setShowDistance(false);
setStartPoint({ latitude: 0, longitude: 0 });
}
}}
/>
)}