Skip to content

Commit 5aec076

Browse files
committed
chore: replaced container image creatable select
1 parent 3a03baa commit 5aec076

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/components/CIPipelineN/TaskTypeDetailComponent.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import React, { useContext, useState, useEffect } from 'react'
17+
import { useContext, useState, useEffect } from 'react'
1818
import Tippy from '@tippyjs/react'
1919
import {
2020
Checkbox,
@@ -25,6 +25,7 @@ import {
2525
ScriptType,
2626
CustomInput,
2727
ClipboardButton,
28+
SelectPicker,
2829
} from '@devtron-labs/devtron-fe-common-lib'
2930
import { components } from 'react-select'
3031
import { TaskFieldDescription, TaskFieldLabel } from '../ciPipeline/types'
@@ -39,9 +40,6 @@ import { OptionType } from '../app/types'
3940
import { ValidationRules } from '../ciPipeline/validationRules'
4041
import { ReactComponent as Info } from '../../assets/icons/ic-info-filled.svg'
4142
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'
4543

4644
export const TaskTypeDetailComponent = () => {
4745
const {
@@ -240,26 +238,17 @@ export const TaskTypeDetailComponent = () => {
240238
/>
241239

242240
<div className="dc__position-rel">
243-
<CreatableSelect
244-
tabIndex={1}
241+
<SelectPicker
242+
inputId="containerImage"
245243
value={selectedContainerImage}
246244
options={containerImageOptions}
247245
placeholder="Select container image or input value"
248246
onChange={handleContainerImageSelector}
249-
styles={containerImageSelectStyles}
250247
classNamePrefix="select"
251-
components={{
252-
MenuList: menuList,
253-
Option,
254-
IndicatorSeparator: null,
255-
ValueContainer,
256-
}}
257-
noOptionsMessage={(): string => {
258-
return 'No matching options'
259-
}}
260248
onBlur={handleCreatableBlur}
261-
isValidNewOption={() => false}
262249
onKeyDown={handleKeyDown}
250+
isCreatable
251+
renderMenuListFooter={renderMenuListFooter}
263252
/>
264253
{selectedContainerImage?.label && (
265254
<div className="flex icon-dim-32 dc__position-abs dc__top-0 dc__right-20">

0 commit comments

Comments
 (0)