Skip to content

Commit 59831b9

Browse files
authored
Merge pull request #287 from devtron-labs/feat/filter-select-error
feat: hide footer on filter select error
2 parents 82defbf + 6d1b03a commit 59831b9

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* vivek@devtron.ai @vikramdevtron

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": "0.2.26",
3+
"version": "0.2.27",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Tooltip/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const Tooltip = ({
2828
arrow={false}
2929
placement="top"
3030
{...rest}
31-
className={`default-tt ${wordBreak ? 'dc__word-break-all' : ''} dc__mxw-200 ${rest.className}`}
31+
className={`default-tt ${wordBreak ? 'dc__word-break-all' : ''} dc__mxw-200-imp ${rest.className}`}
3232
>
3333
{cloneElement(child, { ...child.props, ref: refCallback })}
3434
</TippyJS>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
208208
shouldMenuAlignRight = false,
209209
fullWidth = false,
210210
customSelectedOptionsCount = null,
211+
renderMenuListFooter,
211212
...props
212213
}: SelectPickerProps<OptionValue, IsMulti>) => {
213214
const { inputId, required, isDisabled, controlShouldRenderValue = true, value, options } = props
@@ -397,6 +398,7 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
397398
isValidNewOption={isValidNewOption}
398399
createOptionPosition="first"
399400
onCreateOption={handleCreateOption}
401+
renderMenuListFooter={!optionListError && renderMenuListFooter}
400402
/>
401403
) : (
402404
<ReactSelect
@@ -414,6 +416,7 @@ const SelectPicker = <OptionValue, IsMulti extends boolean>({
414416
ValueContainer: renderValueContainer,
415417
NoOptionsMessage: renderNoOptionsMessage,
416418
}}
419+
renderMenuListFooter={!optionListError && renderMenuListFooter}
417420
/>
418421
)}
419422
</div>

src/Shared/Components/SelectPicker/type.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,13 @@ export interface FilterSelectPickerProps
247247
>,
248248
Pick<
249249
SelectPickerProps<number | string, true>,
250-
'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight'
250+
| 'selectRef'
251+
| 'inputId'
252+
| 'menuPosition'
253+
| 'autoFocus'
254+
| 'shouldMenuAlignRight'
255+
| 'optionListError'
256+
| 'reloadOptionList'
251257
> {
252258
appliedFilterOptions: SelectPickerOptionType[]
253259
handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void

0 commit comments

Comments
 (0)