dhre-ui-kit 0.0.220 → 0.0.222

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/lib/index.d.ts CHANGED
@@ -636,6 +636,7 @@ interface CustomDropdownProps {
636
636
  menuContainerStyle?: ViewStyle;
637
637
  activeColor?: string;
638
638
  renderRightIcon?: (visible?: boolean) => JSX.Element | null | undefined;
639
+ disable?: boolean;
639
640
  }
640
641
  declare const CustomDropdown: (props: CustomDropdownProps) => React$1.JSX.Element;
641
642
 
package/lib/index.js CHANGED
@@ -3456,7 +3456,8 @@ const CustomDropdown = (props) => {
3456
3456
  menuContainerStyle,
3457
3457
  activeColor,
3458
3458
  keepPlaceholderOnFocus = false,
3459
- selectedItemTextStyle
3459
+ selectedItemTextStyle,
3460
+ disable
3460
3461
  } = props;
3461
3462
  const [value, setValue] = React.useState(defaultValue);
3462
3463
  const [isFocus, setIsFocus] = React.useState(false);
@@ -3507,7 +3508,9 @@ const CustomDropdown = (props) => {
3507
3508
  style: [
3508
3509
  styles$8.dropdown,
3509
3510
  dropdownStyle,
3510
- isFocus && (dropdownFocusStyle ?? { borderColor: theme.BORDER_INVERTED["light"] })
3511
+ isFocus && (dropdownFocusStyle ?? {
3512
+ borderColor: theme.BORDER_INVERTED["light"]
3513
+ })
3511
3514
  ],
3512
3515
  placeholderStyle: [styles$8.placeholderStyle, placeholderStyle],
3513
3516
  selectedTextStyle: [styles$8.selectedTextStyle, selectedTextStyle],
@@ -3515,7 +3518,7 @@ const CustomDropdown = (props) => {
3515
3518
  data: data ?? [],
3516
3519
  labelField,
3517
3520
  valueField,
3518
- placeholder,
3521
+ placeholder: keepPlaceholderOnFocus || !isFocus ? placeholder : "",
3519
3522
  value,
3520
3523
  onFocus: () => setIsFocus(true),
3521
3524
  onBlur: () => setIsFocus(false),
@@ -3526,7 +3529,8 @@ const CustomDropdown = (props) => {
3526
3529
  itemTextStyle,
3527
3530
  containerStyle: menuContainerStyle,
3528
3531
  activeColor,
3529
- itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle]
3532
+ itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle],
3533
+ disable
3530
3534
  }
3531
3535
  ));
3532
3536
  };