14
14
* limitations under the License.
15
15
*/
16
16
17
- import React , { useContext , useState , useEffect } from 'react'
17
+ import { useContext , useState , useEffect } from 'react'
18
18
import Tippy from '@tippyjs/react'
19
19
import {
20
20
Checkbox ,
@@ -25,6 +25,7 @@ import {
25
25
ScriptType ,
26
26
CustomInput ,
27
27
ClipboardButton ,
28
+ SelectPicker ,
28
29
} from '@devtron-labs/devtron-fe-common-lib'
29
30
import { components } from 'react-select'
30
31
import { TaskFieldDescription , TaskFieldLabel } from '../ciPipeline/types'
@@ -39,9 +40,6 @@ import { OptionType } from '../app/types'
39
40
import { ValidationRules } from '../ciPipeline/validationRules'
40
41
import { ReactComponent as Info } from '../../assets/icons/ic-info-filled.svg'
41
42
import { pipelineContext } from '../workflowEditor/workflowEditor'
42
- import CreatableSelect from 'react-select/creatable'
43
- import { containerImageSelectStyles } from './ciPipeline.utils'
44
- import { ValueContainerImage as ValueContainer } from '@Components/app/details/appDetails/utils'
45
43
46
44
export const TaskTypeDetailComponent = ( ) => {
47
45
const {
@@ -240,26 +238,17 @@ export const TaskTypeDetailComponent = () => {
240
238
/>
241
239
242
240
< div className = "dc__position-rel" >
243
- < CreatableSelect
244
- tabIndex = { 1 }
241
+ < SelectPicker
242
+ inputId = "containerImage"
245
243
value = { selectedContainerImage }
246
244
options = { containerImageOptions }
247
245
placeholder = "Select container image or input value"
248
246
onChange = { handleContainerImageSelector }
249
- styles = { containerImageSelectStyles }
250
247
classNamePrefix = "select"
251
- components = { {
252
- MenuList : menuList ,
253
- Option,
254
- IndicatorSeparator : null ,
255
- ValueContainer,
256
- } }
257
- noOptionsMessage = { ( ) : string => {
258
- return 'No matching options'
259
- } }
260
248
onBlur = { handleCreatableBlur }
261
- isValidNewOption = { ( ) => false }
262
249
onKeyDown = { handleKeyDown }
250
+ isCreatable
251
+ renderMenuListFooter = { renderMenuListFooter }
263
252
/>
264
253
{ selectedContainerImage ?. label && (
265
254
< div className = "flex icon-dim-32 dc__position-abs dc__top-0 dc__right-20" >
0 commit comments