Skip to content

Commit 729efdd

Browse files
committed
Merge branch 'develop' into feat/async-select-recent-option
2 parents 6f7f431 + fdf2c98 commit 729efdd

File tree

9 files changed

+256
-221
lines changed

9 files changed

+256
-221
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.10.4",
3+
"version": "1.10.5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/ChartVersionAndTypeSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const ChartVersionAndTypeSelector = ({ setSelectedChartRefId }: ChartVersionAndT
8383
value={selectedChartType ?? chartTypeOptions[0]}
8484
options={chartTypeOptions}
8585
onChange={handleChartTypeChange}
86-
variant={SelectPickerVariantType.BORDER_LESS}
86+
variant={SelectPickerVariantType.COMPACT}
8787
/>
8888
</div>
8989
<div className="chart-version-options flex" data-testid="chart-version-options">
@@ -93,7 +93,7 @@ const ChartVersionAndTypeSelector = ({ setSelectedChartRefId }: ChartVersionAndT
9393
value={selectedChartVersion ?? chartVersionOptions[0]}
9494
options={chartVersionOptions}
9595
onChange={handleChartVersionChange}
96-
variant={SelectPickerVariantType.BORDER_LESS}
96+
variant={SelectPickerVariantType.COMPACT}
9797
/>
9898
</div>
9999
</div>

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const DeploymentHistoryConfigDiffCompare = ({
147147
name: 'deployment-config-diff-deployment-selector',
148148
inputId: 'deployment-config-diff-deployment-selector',
149149
classNamePrefix: 'deployment-config-diff-deployment-selector',
150-
variant: SelectPickerVariantType.BORDER_LESS,
150+
variant: SelectPickerVariantType.COMPACT,
151151
options: pipelineDeploymentsOptions,
152152
placeholder: 'Select Deployment',
153153
value: getSelectPickerOptionByValue(pipelineDeploymentsOptions, compareWfrId, null),

src/Shared/Components/DynamicDataTable/DynamicDataTableRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const DynamicDataTableRow = <K extends string, CustomStateType = Record<s
169169
{...row.data[key].props}
170170
inputId={`data-table-${row.id}-${key}-cell`}
171171
classNamePrefix="dynamic-data-table__cell__select-picker"
172-
variant={SelectPickerVariantType.BORDER_LESS}
172+
variant={SelectPickerVariantType.COMPACT}
173173
value={getSelectPickerOptionByValue(
174174
row.data[key].props?.options,
175175
row.data[key].value,
@@ -191,7 +191,7 @@ export const DynamicDataTableRow = <K extends string, CustomStateType = Record<s
191191
isCreatable={isCreatable}
192192
isClearable
193193
{...props}
194-
variant={SelectPickerVariantType.BORDER_LESS}
194+
variant={SelectPickerVariantType.COMPACT}
195195
classNamePrefix="dynamic-data-table__cell__select-picker-text-area"
196196
inputId={`data-table-${row.id}-${key}-cell`}
197197
minHeight={20}

src/Shared/Components/GraphVisualizer/components/DropdownNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const DropdownNode = ({ id, data, isConnectable }: NodeProps<DropdownNode
3434
<SelectPicker<string | number, false>
3535
{...restData}
3636
classNamePrefix="graph-visualizer-dropdown-node"
37-
variant={SelectPickerVariantType.BORDER_LESS}
37+
variant={SelectPickerVariantType.COMPACT}
3838
menuPortalTarget={document.querySelector('.graph-visualizer')}
3939
menuSize={ComponentSizeType.xs}
4040
fullWidth

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,12 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
361361
e.preventDefault()
362362
}
363363

364-
if (e.key === 'Escape' && !selectRef.current.props.menuIsOpen) {
365-
selectRef.current.blur()
364+
if (e.key === 'Escape') {
365+
e.stopPropagation()
366+
367+
if (!selectRef.current.props.menuIsOpen) {
368+
selectRef.current.blur()
369+
}
366370
}
367371

368372
onKeyDown?.(e)

src/Shared/Components/SelectPicker/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ declare module 'react-select/base' {
127127
export enum SelectPickerVariantType {
128128
DEFAULT = 'default',
129129
BORDER_LESS = 'border-less',
130+
COMPACT = 'compact',
130131
}
131132

132133
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<

0 commit comments

Comments
 (0)