lisichatbot 2.2.7 → 2.2.8
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/package.json +1 -1
- package/src/index.js +12 -6
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1213,11 +1213,14 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
|
|
|
1213
1213
|
minInput.setAttribute('inputmode', 'numeric'); // Show numeric keyboard on mobile
|
|
1214
1214
|
minInput.setAttribute('data-min', customConfig.min !== undefined ? customConfig.min : 0);
|
|
1215
1215
|
minInput.setAttribute('data-max', customConfig.max !== undefined ? customConfig.max : 100);
|
|
1216
|
-
if (customConfig.minPlaceholder !== undefined)
|
|
1217
|
-
|
|
1216
|
+
if (customConfig.minPlaceholder !== undefined) {
|
|
1217
|
+
const phVal = Number(customConfig.minPlaceholder);
|
|
1218
|
+
minInput.setAttribute('placeholder', !isNaN(phVal) && config.localeString ? phVal.toLocaleString(config.localeString) : customConfig.minPlaceholder);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1218
1221
|
if (showMinMax && existingData[0] !== undefined) {
|
|
1219
1222
|
const numValue = Number(existingData[0]);
|
|
1220
|
-
minInput.value = numValue.toLocaleString();
|
|
1223
|
+
minInput.value = config.localeString ? numValue.toLocaleString(config.localeString) : numValue.toLocaleString();
|
|
1221
1224
|
minInput.setAttribute('data-raw-value', existingData[0]);
|
|
1222
1225
|
// console.log(` ✅ Pre-filled min: ${existingData[0]} (display: ${numValue.toLocaleString()})`);
|
|
1223
1226
|
}
|
|
@@ -1238,11 +1241,14 @@ function renderMinMaxInputs(field, customConfig, existingData, hasMatchingNormal
|
|
|
1238
1241
|
maxInput.setAttribute('inputmode', 'numeric'); // Show numeric keyboard on mobile
|
|
1239
1242
|
maxInput.setAttribute('data-min', customConfig.min !== undefined ? customConfig.min : 0);
|
|
1240
1243
|
maxInput.setAttribute('data-max', customConfig.max !== undefined ? customConfig.max : 100);
|
|
1241
|
-
if (customConfig.maxPlaceholder !== undefined)
|
|
1242
|
-
|
|
1244
|
+
if (customConfig.maxPlaceholder !== undefined) {
|
|
1245
|
+
const phVal = Number(customConfig.maxPlaceholder);
|
|
1246
|
+
maxInput.setAttribute('placeholder', !isNaN(phVal) && config.localeString ? phVal.toLocaleString(config.localeString) : customConfig.maxPlaceholder);
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1243
1249
|
if (showMinMax && existingData[1] !== undefined) {
|
|
1244
1250
|
const numValue = Number(existingData[1]);
|
|
1245
|
-
maxInput.value = numValue.toLocaleString();
|
|
1251
|
+
maxInput.value = config.localeString ? numValue.toLocaleString(config.localeString) : numValue.toLocaleString();
|
|
1246
1252
|
maxInput.setAttribute('data-raw-value', existingData[1]);
|
|
1247
1253
|
// console.log(` ✅ Pre-filled max: ${existingData[1]} (display: ${numValue.toLocaleString()})`);
|
|
1248
1254
|
}
|