Skip to content

Commit 4637dfb

Browse files
committed
fix: border on menu and required spacing
1 parent d7b2a4b commit 4637dfb

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const SelectPicker = ({
5555
{typeof label === 'string' ? (
5656
<span className={`flex left ${required ? 'dc__required-field' : ''}`}>
5757
<span className="dc__truncate">{label}</span>
58+
{required && <span>&nbsp;</span>}
5859
</span>
5960
) : (
6061
label
@@ -76,6 +77,10 @@ const SelectPicker = ({
7677
}}
7778
styles={selectStyles}
7879
className="w-100"
80+
menuPlacement="auto"
81+
menuPosition="fixed"
82+
menuShouldScrollIntoView
83+
backspaceRemovesValue={false}
7984
/>
8085
</div>
8186
{error && (

src/Shared/Components/SelectPicker/type.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ export interface SelectPickerProps
1616
SelectProps,
1717
| 'options'
1818
| 'value'
19-
| 'isMulti'
2019
| 'onChange'
2120
| 'isSearchable'
2221
| 'isClearable'
2322
| 'isLoading'
2423
| 'placeholder'
2524
| 'hideSelectedOptions'
2625
| 'controlShouldRenderValue'
27-
| 'backspaceRemovesValue'
2826
| 'closeMenuOnSelect'
2927
| 'isDisabled'
3028
| 'isLoading'
@@ -36,4 +34,5 @@ export interface SelectPickerProps
3634
renderMenuListFooter?: () => ReactNode
3735
helperText?: ReactNode
3836
label?: ReactNode
37+
// TODO Eshank: Add support for border less
3938
}

src/Shared/Components/SelectPicker/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const getCommonSelectStyle = ({ hasError }: { hasError: boolean }) => ({
1111
overflow: 'hidden',
1212
marginBlock: '4px',
1313
backgroundColor: 'var(--N0)',
14+
border: '1px solid var(--N200)',
1415
boxShadow: '0px 2px 4px 0px rgba(0, 0, 0, 0.20)',
1516
}),
1617
menuList: (base) => ({

0 commit comments

Comments
 (0)