File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
apps/copilots/src/pages/copilot-request-form
libs/ui/lib/components/form/form-groups/form-input/input-select-react Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,8 @@ const CopilotRequestForm: FC<{}> = () => {
250
250
< h1 className = { styles . heading } > Copilot Request </ h1 >
251
251
< p className = { styles . subheading } >
252
252
Hi,
253
- { profile ?. firstName }
254
253
{ ' ' }
254
+ { profile ?. firstName }
255
255
!
256
256
This form is to request a copilot for your project. Please fill in the details below.
257
257
</ p >
@@ -273,6 +273,7 @@ const CopilotRequestForm: FC<{}> = () => {
273
273
label = 'Project'
274
274
placeholder = 'Start typing the name of the project'
275
275
dirty
276
+ isClearable
276
277
error = { formErrors . projectId }
277
278
/>
278
279
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ $gradient: linear-gradient(
50
50
51
51
.skillsWrapper {
52
52
border : 1px solid #aaaaaa ;
53
- border-radius : 0.375rem ;
53
+ border-radius : 0.375rem ;
54
+ }
55
+
56
+ .skillsWrapper :hover {
57
+ border-color : #137D60 ;
54
58
}
55
59
56
60
.skillsError {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ interface InputSelectReactProps {
48
48
readonly async ?: boolean
49
49
readonly loadOptions ?: ( inputValue : string , callback : ( option : any ) => void ) => void
50
50
readonly filterOption ?: ( option : InputSelectOption , value : string ) => boolean
51
+ readonly isClearable ?: boolean
51
52
}
52
53
53
54
/**
@@ -105,11 +106,12 @@ const InputSelectReact: FC<InputSelectReactProps> = props => {
105
106
106
107
// throw the proper event type to the form handler (needs name & form element on target)
107
108
function handleSelect ( option : unknown ) : void {
109
+ const selectedOption = option as InputSelectOption | null
108
110
props . onChange ( {
109
111
target : {
110
112
form : findParentFrom ( wrapRef . current as HTMLDivElement ) ,
111
113
name : props . name ,
112
- value : ( option as InputSelectOption ) . value ,
114
+ value : selectedOption ? .value || '' ,
113
115
} ,
114
116
} as ChangeEvent < HTMLInputElement > )
115
117
}
@@ -162,6 +164,7 @@ const InputSelectReact: FC<InputSelectReactProps> = props => {
162
164
formatCreateLabel = { props . createLabel }
163
165
onCreateOption = { props . onCreateOption }
164
166
onBlur = { handleBlur }
167
+ isClearable = { props . isClearable }
165
168
backspaceRemovesValue
166
169
isDisabled = { props . disabled }
167
170
filterOption = { props . filterOption }
You can’t perform that action at this time.
0 commit comments