Skip to content

Commit 52eeb19

Browse files
committed
fix: rename the components
1 parent cbdb740 commit 52eeb19

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Shared/Components/SelectPicker/SelectPicker.component.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import { ConditionalWrap } from '@Common/Helper'
3333
import Tippy from '@tippyjs/react'
3434
import { getCommonSelectStyle } from './utils'
3535
import {
36-
MultiValueLabel,
37-
MultiValueRemove,
36+
SelectPickerMultiValueLabel,
37+
SelectPickerMultiValueRemove,
3838
SelectPickerClearIndicator,
3939
SelectPickerControl,
4040
SelectPickerDropdownIndicator,
@@ -183,6 +183,7 @@ const SelectPicker = forwardRef(
183183
[error, selectSize, menuSize, variant, isGroupHeadingSelectable],
184184
)
185185

186+
// Used to show the create new option for creatable select
186187
const isValidNewOption = (inputValue: string) => isCreatable && !!inputValue?.trim()
187188

188189
const renderControl = useCallback(
@@ -226,7 +227,7 @@ const SelectPicker = forwardRef(
226227
)
227228

228229
const renderMultiValueLabel = (multiValueLabelProps: MultiValueProps<SelectPickerOptionType, true>) => (
229-
<MultiValueLabel {...multiValueLabelProps} getIsOptionValid={getIsOptionValid} />
230+
<SelectPickerMultiValueLabel {...multiValueLabelProps} getIsOptionValid={getIsOptionValid} />
230231
)
231232

232233
const renderGroupHeading = useCallback(
@@ -284,7 +285,7 @@ const SelectPicker = forwardRef(
284285
ClearIndicator: SelectPickerClearIndicator,
285286
ValueContainer: renderValueContainer,
286287
MultiValueLabel: renderMultiValueLabel,
287-
MultiValueRemove,
288+
MultiValueRemove: SelectPickerMultiValueRemove,
288289
GroupHeading: renderGroupHeading,
289290
}}
290291
styles={selectStyles}

src/Shared/Components/SelectPicker/common.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const SelectPickerMenuList = ({
183183
)
184184
}
185185

186-
export const MultiValueLabel = ({
186+
export const SelectPickerMultiValueLabel = ({
187187
getIsOptionValid,
188188
...props
189189
}: MultiValueProps<SelectPickerOptionType, true> & Pick<SelectPickerProps['multiSelectProps'], 'getIsOptionValid'>) => {
@@ -205,7 +205,7 @@ export const MultiValueLabel = ({
205205
)
206206
}
207207

208-
export const MultiValueRemove = (props: MultiValueRemoveProps) => (
208+
export const SelectPickerMultiValueRemove = (props: MultiValueRemoveProps) => (
209209
<components.MultiValueLabel {...props}>
210210
<span className="flex dc__no-shrink">
211211
<ICClose className="icon-dim-12 icon-use-fill-n6" />

0 commit comments

Comments
 (0)