Skip to content

Commit

Permalink
Merge pull request #512 from ertush/hotfix
Browse files Browse the repository at this point in the history
Hotfix: Fixed issue in CustomsSelect Component components/Forms/formC…
  • Loading branch information
ertush authored Oct 22, 2024
2 parents 3decc36 + daf3d5e commit 59b1b7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Forms/formComponents/Select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { forwardRef } from 'react'
import {v4 as uuid} from 'uuid'


const Select = forwardRef(function Select(props, ref) {

Expand All @@ -12,7 +12,7 @@ const Select = forwardRef(function Select(props, ref) {
className='flex-none w-full p-2 border border-gray-800 rounded bg-transparent flex-grow placeholder-gray-200 focus:border-black outline-none'>
{
((_options) => _options.map(({ value, label }, i) =>
<option className={`py-1 hover:bg-red-300 text-normal font-normal ${i == 0 ? 'text-gray-300' : ''}`} key={uuid()} value={value}>{label}</option>
<option className={`py-1 hover:bg-red-300 text-normal font-normal ${i == 0 ? 'text-gray-300' : ''}`} key={i} value={value}>{label}</option>
))(props.options?.length ? [{label:props.placeholder ?? "Select option..", value:""}, ...props.options] : [])
}
</select>
Expand Down

0 comments on commit 59b1b7f

Please sign in to comment.