fix: drop downs not populating on edit
All checks were successful
Deploy to Staging / Build Images (push) Successful in 2m33s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
All checks were successful
Deploy to Staging / Build Images (push) Successful in 2m33s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
This commit is contained in:
@@ -114,6 +114,8 @@ export const VehicleForm: React.FC<VehicleFormProps> = ({
|
|||||||
const watchedMake = watch('make');
|
const watchedMake = watch('make');
|
||||||
const watchedModel = watch('model');
|
const watchedModel = watch('model');
|
||||||
const watchedTrim = watch('trimLevel');
|
const watchedTrim = watch('trimLevel');
|
||||||
|
const watchedEngine = watch('engine');
|
||||||
|
const watchedTransmission = watch('transmission');
|
||||||
|
|
||||||
// Load years on component mount
|
// Load years on component mount
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -560,6 +562,10 @@ export const VehicleForm: React.FC<VehicleFormProps> = ({
|
|||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
{...register('engine')}
|
{...register('engine')}
|
||||||
|
value={watchedEngine || ''}
|
||||||
|
onChange={(e) => {
|
||||||
|
setValue('engine', e.target.value);
|
||||||
|
}}
|
||||||
className="w-full px-3 py-2 border rounded-md min-h-[44px] bg-white text-gray-900 border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-scuro dark:text-avus dark:border-silverstone dark:focus:ring-abudhabi dark:focus:border-abudhabi"
|
className="w-full px-3 py-2 border rounded-md min-h-[44px] bg-white text-gray-900 border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-scuro dark:text-avus dark:border-silverstone dark:focus:ring-abudhabi dark:focus:border-abudhabi"
|
||||||
disabled={loadingDropdowns || !watchedTrim || engines.length === 0}
|
disabled={loadingDropdowns || !watchedTrim || engines.length === 0}
|
||||||
style={{ fontSize: '16px' }}
|
style={{ fontSize: '16px' }}
|
||||||
@@ -588,6 +594,10 @@ export const VehicleForm: React.FC<VehicleFormProps> = ({
|
|||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
{...register('transmission')}
|
{...register('transmission')}
|
||||||
|
value={watchedTransmission || ''}
|
||||||
|
onChange={(e) => {
|
||||||
|
setValue('transmission', e.target.value);
|
||||||
|
}}
|
||||||
className="w-full px-3 py-2 border rounded-md min-h-[44px] bg-white text-gray-900 border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-scuro dark:text-avus dark:border-silverstone dark:focus:ring-abudhabi dark:focus:border-abudhabi"
|
className="w-full px-3 py-2 border rounded-md min-h-[44px] bg-white text-gray-900 border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-scuro dark:text-avus dark:border-silverstone dark:focus:ring-abudhabi dark:focus:border-abudhabi"
|
||||||
disabled={loadingDropdowns || !watchedTrim || transmissions.length === 0}
|
disabled={loadingDropdowns || !watchedTrim || transmissions.length === 0}
|
||||||
style={{ fontSize: '16px' }}
|
style={{ fontSize: '16px' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user