arengibook 2.4.641 → 2.4.643
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/dist/index.js +54 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39346,26 +39346,27 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39346
39346
|
style: styleLabel
|
|
39347
39347
|
}, option[optionLabel]));
|
|
39348
39348
|
};
|
|
39349
|
-
var selectedItemTemplate = function selectedItemTemplate(
|
|
39350
|
-
// const selectedOption = loadedOptions.find(opt => opt[optionValue] === paramValue);
|
|
39349
|
+
var selectedItemTemplate = function selectedItemTemplate(option) {
|
|
39351
39350
|
var selectedOption = objValue.find(function (opt) {
|
|
39352
|
-
return opt[optionValue] ===
|
|
39351
|
+
return opt[optionValue] === option;
|
|
39353
39352
|
});
|
|
39354
39353
|
console.log("ecoute de selectedOption");
|
|
39355
39354
|
console.log(loadedOptions.find(function (opt) {
|
|
39356
|
-
return opt[optionValue] ===
|
|
39355
|
+
return opt[optionValue] === option;
|
|
39356
|
+
}));
|
|
39357
|
+
console.log(loadedOptions.find(function (opt) {
|
|
39358
|
+
return Number(opt[optionValue]) === Number(option);
|
|
39357
39359
|
}));
|
|
39358
39360
|
console.log(selectedOption);
|
|
39359
39361
|
console.log(objValue);
|
|
39360
|
-
console.log(paramValue);
|
|
39361
39362
|
console.log(selectedOptions);
|
|
39362
39363
|
console.log(loadedOptions);
|
|
39364
|
+
console.log(option);
|
|
39363
39365
|
if (!selectedOption) return null;
|
|
39364
|
-
// const isLastItem = index === selectedOptions.length - 1;
|
|
39365
39366
|
var handleRemove = function handleRemove(e) {
|
|
39366
39367
|
e.stopPropagation();
|
|
39367
39368
|
var newSelectedOptions = selectedOptions.filter(function (opt) {
|
|
39368
|
-
return opt !==
|
|
39369
|
+
return opt !== option;
|
|
39369
39370
|
});
|
|
39370
39371
|
setSelectedOptions(newSelectedOptions);
|
|
39371
39372
|
if (onChange) onChange(newSelectedOptions);
|
|
@@ -39392,6 +39393,52 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39392
39393
|
}, "\xD7"));
|
|
39393
39394
|
};
|
|
39394
39395
|
|
|
39396
|
+
// const selectedItemTemplate = (paramValue, index) => {
|
|
39397
|
+
// // const selectedOption = loadedOptions.find(opt => opt[optionValue] === paramValue);
|
|
39398
|
+
// const selectedOption = objValue.find(opt => opt[optionValue] === paramValue);
|
|
39399
|
+
//
|
|
39400
|
+
// console.log("ecoute de selectedOption")
|
|
39401
|
+
// console.log(loadedOptions.find(opt => opt[optionValue] === paramValue))
|
|
39402
|
+
// console.log(selectedOption)
|
|
39403
|
+
// console.log(objValue)
|
|
39404
|
+
// console.log(paramValue)
|
|
39405
|
+
// console.log(selectedOptions)
|
|
39406
|
+
// console.log(loadedOptions)
|
|
39407
|
+
//
|
|
39408
|
+
// if (!selectedOption) return null;
|
|
39409
|
+
// // const isLastItem = index === selectedOptions.length - 1;
|
|
39410
|
+
// const handleRemove = (e) => {
|
|
39411
|
+
// e.stopPropagation();
|
|
39412
|
+
// const newSelectedOptions = selectedOptions.filter(opt => opt !== paramValue);
|
|
39413
|
+
// setSelectedOptions(newSelectedOptions);
|
|
39414
|
+
// if (onChange) onChange(newSelectedOptions);
|
|
39415
|
+
// };
|
|
39416
|
+
//
|
|
39417
|
+
// return (
|
|
39418
|
+
// <span
|
|
39419
|
+
// onClick={handleRemove}
|
|
39420
|
+
// style={{
|
|
39421
|
+
// backgroundColor: selectedOption?.color ? selectedOption?.color : '#f8e6ec',
|
|
39422
|
+
// color: selectedOption?.color ? inverseColor(selectedOption?.color) : '#333',
|
|
39423
|
+
// padding: '6px 12px',
|
|
39424
|
+
// fontSize: '14px',
|
|
39425
|
+
// borderRadius: '8px',
|
|
39426
|
+
// boxShadow: '2px 2px 4px rgba(0, 0, 0, 0.15)',
|
|
39427
|
+
// display: 'inline-block',
|
|
39428
|
+
// marginBottom: '5px',
|
|
39429
|
+
// fontFamily: 'Arial',
|
|
39430
|
+
// cursor: 'pointer',
|
|
39431
|
+
// marginRight: '15px',
|
|
39432
|
+
// ...valueStyle,
|
|
39433
|
+
// }}
|
|
39434
|
+
// >
|
|
39435
|
+
// {selectedOption[optionLabel]}
|
|
39436
|
+
// <span style={{ marginLeft: '5px' }}>×</span>
|
|
39437
|
+
// </span>
|
|
39438
|
+
// );
|
|
39439
|
+
//
|
|
39440
|
+
// };
|
|
39441
|
+
|
|
39395
39442
|
// Fonction de lazy loading
|
|
39396
39443
|
var onLazyLoad = function onLazyLoad(event) {
|
|
39397
39444
|
if (isOptionsArray) return;
|