@bigbinary/neetoui 5.0.4 → 5.0.5

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/formik.cjs.js CHANGED
@@ -25598,7 +25598,7 @@ var AsyncCreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
25598
25598
  }, selectProps));
25599
25599
  });
25600
25600
 
25601
- var _excluded$5 = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components"];
25601
+ var _excluded$5 = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping"];
25602
25602
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
25603
25603
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25604
25604
  var SIZES$1 = {
@@ -25641,6 +25641,8 @@ var Select = function Select(_ref) {
25641
25641
  value = _ref.value,
25642
25642
  defaultValue = _ref.defaultValue,
25643
25643
  componentOverrides = _ref.components,
25644
+ _ref$optionRemapping = _ref.optionRemapping,
25645
+ optionRemapping = _ref$optionRemapping === void 0 ? {} : _ref$optionRemapping,
25644
25646
  otherProps = _objectWithoutProperties$1(_ref, _excluded$5);
25645
25647
  var inputId = useId(id);
25646
25648
  var Parent = StateManagedSelect;
@@ -25650,6 +25652,12 @@ var Select = function Select(_ref) {
25650
25652
  if (otherProps.loadOptions) {
25651
25653
  Parent = isCreateable ? AsyncCreatableSelect : AsyncSelect;
25652
25654
  }
25655
+ if (optionRemapping.value) {
25656
+ otherProps.getOptionValue = prop(optionRemapping.value);
25657
+ }
25658
+ if (optionRemapping.label) {
25659
+ otherProps.getOptionLabel = prop(optionRemapping.label);
25660
+ }
25653
25661
  var portalProps = strategy === STRATEGIES.fixed && {
25654
25662
  menuPortalTarget: document.body,
25655
25663
  styles: {