Skip to content

Commit

Permalink
Hotfix: Fixed issue in CustomsSelect Component components/Forms/formC…
Browse files Browse the repository at this point in the history
…omponents/Select.js; line 15
  • Loading branch information
ertush committed Oct 22, 2024
1 parent 6ea28e2 commit daf3d5e
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 daf3d5e

Please sign in to comment.