mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
found issues with the submit button not refreshing state as well as a need for user feedback
This commit is contained in:
parent
7f9b7f2992
commit
e8e68e6505
1 changed files with 16 additions and 13 deletions
|
|
@ -63,6 +63,8 @@ const goalValueOptions = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
export function SelectDropdown({
|
||||
options,
|
||||
selectedOption,
|
||||
|
|
@ -151,19 +153,19 @@ export default function RemoteAssesmentModal({
|
|||
setValuation(event.target.value);
|
||||
}
|
||||
|
||||
function handleButtonDisabled(): boolean {
|
||||
return !(
|
||||
scenario &&
|
||||
selectedGoal &&
|
||||
housingType &&
|
||||
addressLineOne &&
|
||||
postcode &&
|
||||
uprn &&
|
||||
valuation
|
||||
);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
function handleButtonDisabled(): boolean {
|
||||
return !(
|
||||
scenario &&
|
||||
selectedGoal &&
|
||||
housingType &&
|
||||
addressLineOne &&
|
||||
postcode &&
|
||||
uprn &&
|
||||
valuation
|
||||
);
|
||||
}
|
||||
|
||||
setButtonDisabled(handleButtonDisabled());
|
||||
}, [scenario, selectedGoal, housingType, addressLineOne, postcode, uprn, valuation]);
|
||||
|
||||
|
|
@ -255,7 +257,7 @@ export default function RemoteAssesmentModal({
|
|||
)}
|
||||
</div>
|
||||
<div className="flex justify-center mt-6">
|
||||
Address Line One
|
||||
Address Line 1
|
||||
<Input type="text" onChange={handleAddressLineOneChange}/>
|
||||
</div>
|
||||
<div className="flex justify-center mt-6">
|
||||
|
|
@ -286,6 +288,7 @@ export default function RemoteAssesmentModal({
|
|||
type="button"
|
||||
className="inline-flex justify-center rounded-md border border-transparent bg-blue-100 px-4 py-2 text-sm font-medium text-blue-900 hover:bg-blue-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
||||
onClick={() => setIsOpen(false)}
|
||||
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue