mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE-137): conditionally render location SelectInput in RecordingForm based on type
This commit is contained in:
@@ -675,20 +675,21 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
body: 'flex flex-col gap-6',
|
body: 'flex flex-col gap-6',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className='grid grid-cols-1 md:grid-cols-2 gap-6'>
|
<div className={type === 'detail' ? 'flex flex-col gap-6' : 'grid grid-cols-1 md:grid-cols-2 gap-6'}>
|
||||||
<SelectInput
|
{type === 'detail' ? null : (
|
||||||
required
|
<SelectInput
|
||||||
label='Lokasi'
|
required
|
||||||
value={selectedLocation}
|
label='Lokasi'
|
||||||
onChange={locationChangeHandler}
|
value={selectedLocation}
|
||||||
options={locationOptions}
|
onChange={locationChangeHandler}
|
||||||
onInputChange={setLocationSearchValue}
|
options={locationOptions}
|
||||||
isLoading={isLoadingLocations}
|
onInputChange={setLocationSearchValue}
|
||||||
isDisabled={type === 'detail'}
|
isLoading={isLoadingLocations}
|
||||||
placeholder='Pilih Lokasi'
|
placeholder='Pilih Lokasi'
|
||||||
isClearable
|
isClearable
|
||||||
isSearchable
|
isSearchable
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<SelectInput
|
<SelectInput
|
||||||
|
|||||||
Reference in New Issue
Block a user