arengibook 2.4.652 → 2.4.653

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39636,7 +39636,9 @@ var MultiSelect = function MultiSelect(props) {
39636
39636
  generalImage: null
39637
39637
  } : _props$groupedItemTem,
39638
39638
  _props$isSelectMeta = props.isSelectMeta,
39639
- isSelectMeta = _props$isSelectMeta === void 0 ? false : _props$isSelectMeta;
39639
+ isSelectMeta = _props$isSelectMeta === void 0 ? false : _props$isSelectMeta,
39640
+ _props$ongletID = props.ongletID,
39641
+ ongletID = _props$ongletID === void 0 ? null : _props$ongletID;
39640
39642
  var isAsyncOptions = typeof options === 'function';
39641
39643
  if (isAsyncOptions) {
39642
39644
  return /*#__PURE__*/React__default.createElement(MultiSelectMetaAsync, props);
@@ -39884,13 +39886,21 @@ var MultiSelect = function MultiSelect(props) {
39884
39886
  return /*#__PURE__*/React__default.createElement("div", {
39885
39887
  key: index
39886
39888
  }, option ? option.label : optionValue);
39887
- })))), name && /*#__PURE__*/React__default.createElement("input", {
39888
- type: "hidden",
39889
- name: name,
39890
- value: selectedOptions.map(function (opt) {
39891
- return opt[optionValue];
39892
- }).join(',')
39893
- }), invalid && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("small", {
39889
+ })))), name && /*#__PURE__*/React__default.createElement("div", null, (Array.isArray(selectedOptions) ? selectedOptions : []).filter(function (opt) {
39890
+ return opt && (_typeof$b(opt) === 'object' || typeof opt === 'number' || typeof opt === 'string');
39891
+ }).map(function (opt, index) {
39892
+ // normalisation
39893
+ var id = _typeof$b(opt) === 'object' && opt !== null ? opt[optionValue] : opt;
39894
+ var nameAttr = _typeof$b(opt) === 'object' && opt !== null ? opt[optionLabel] || opt.nom || '' : '';
39895
+ return /*#__PURE__*/React__default.createElement("input", {
39896
+ key: index,
39897
+ type: "hidden",
39898
+ name: name,
39899
+ "data-id-onglet": ongletID,
39900
+ "data-name": nameAttr,
39901
+ value: id
39902
+ });
39903
+ })), invalid && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("small", {
39894
39904
  style: {
39895
39905
  color: 'red',
39896
39906
  fontStyle: 'italic'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.4.652",
4
+ "version": "2.4.653",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {