@rpg-engine/long-bow 0.5.62 → 0.5.65

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.
@@ -9,5 +9,6 @@ export interface IDropdownProps {
9
9
  width?: string;
10
10
  onChange: (value: string) => void;
11
11
  defaultValue?: string;
12
+ triggerChangeOnMount?: boolean;
12
13
  }
13
14
  export declare const Dropdown: React.FC<IDropdownProps>;
@@ -14800,7 +14800,9 @@ var Dropdown = function Dropdown(_ref) {
14800
14800
  var options = _ref.options,
14801
14801
  width = _ref.width,
14802
14802
  onChange = _ref.onChange,
14803
- defaultValue = _ref.defaultValue;
14803
+ defaultValue = _ref.defaultValue,
14804
+ _ref$triggerChangeOnM = _ref.triggerChangeOnMount,
14805
+ triggerChangeOnMount = _ref$triggerChangeOnM === void 0 ? true : _ref$triggerChangeOnM;
14804
14806
  var dropdownId = uuid.v4();
14805
14807
  var _useState = React.useState(defaultValue || ''),
14806
14808
  selectedValue = _useState[0],
@@ -14842,7 +14844,7 @@ var Dropdown = function Dropdown(_ref) {
14842
14844
  }
14843
14845
  }, [defaultValue]);
14844
14846
  React.useEffect(function () {
14845
- if (selectedValue) {
14847
+ if (selectedValue && triggerChangeOnMount) {
14846
14848
  onChange(selectedValue);
14847
14849
  }
14848
14850
  }, [selectedValue]);