@devtron-labs/devtron-fe-common-lib 0.0.40-beta-3 → 0.0.40-beta-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.40-beta-3",
3
+ "version": "0.0.40-beta-7",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  import React from 'react'
2
+ import isEqual from 'lodash/isEqual'
2
3
  import { WidgetProps } from '@rjsf/utils'
3
4
  import ReactSelect, { MenuListProps, components } from 'react-select'
4
5
  import { PLACEHOLDERS } from '../constants'
@@ -41,8 +42,8 @@ export const Select = (props: WidgetProps) => {
41
42
 
42
43
  const getOption = (value) =>
43
44
  multiple
44
- ? selectOptions.filter((option) => value.includes(option.value))
45
- : selectOptions.find((option) => option.value === value)
45
+ ? selectOptions.filter((option) => value.some((val) => isEqual(val, option.value)))
46
+ : selectOptions.find((option) => isEqual(value, option.value))
46
47
 
47
48
  return (
48
49
  <ReactSelect