File tree Expand file tree Collapse file tree
ui/src/pages/Admin/AiSettings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -427,12 +427,35 @@ const Index = () => {
427427 </ InputGroup >
428428 </ Form . Group >
429429
430- < Form . Group className = "mb-3" controlId = "model" >
431- < Form . Label > { t ( 'model.label' ) } </ Form . Label >
432- < Form . Control
433- list = "modelOptions"
434- autoComplete = "off"
435- isInvalid = { formData . model . isInvalid }
430+ < div className = "mb-3" >
431+ < label htmlFor = "model" className = "form-label" >
432+ { t ( 'model.label' ) }
433+ </ label >
434+ { /* <Form.Select
435+ list="datalistOptions"
436+ isInvalid={formData.model.isInvalid}
437+ value={formData.model.value}
438+ onChange={(e) =>
439+ handleValueChange({
440+ model: {
441+ value: e.target.value,
442+ errorMsg: '',
443+ isInvalid: false,
444+ },
445+ })
446+ }>
447+ {modelsData?.map((model) => {
448+ return (
449+ <option key={model.id} value={model.id}>
450+ {model.id}
451+ </option>
452+ );
453+ }) }
454+ </Form.Select> */ }
455+ < input
456+ className = "form-control"
457+ list = "datalistOptions"
458+ id = "model"
436459 value = { formData . model . value }
437460 onChange = { ( e ) =>
438461 handleValueChange ( {
@@ -444,15 +467,18 @@ const Index = () => {
444467 } )
445468 }
446469 />
447- < datalist id = "modelOptions" >
448- { modelsData ?. map ( ( model ) => (
449- < option key = { model . id } value = { model . id } />
450- ) ) }
470+ < datalist id = "datalistOptions" >
471+ { modelsData ?. map ( ( model ) => {
472+ return (
473+ < option key = { model . id } value = { model . id } >
474+ { model . id }
475+ </ option >
476+ ) ;
477+ } ) }
451478 </ datalist >
452- < Form . Control . Feedback type = "invalid" >
453- { formData . model . errorMsg }
454- </ Form . Control . Feedback >
455- </ Form . Group >
479+
480+ < div className = "invalid-feedback" > { formData . model . errorMsg } </ div >
481+ </ div >
456482
457483 < Button type = "submit" > { t ( 'save' , { keyPrefix : 'btns' } ) } </ Button >
458484 </ Form >
You can’t perform that action at this time.
0 commit comments