px-react-ui-components 1.0.17 → 1.0.19

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.
@@ -63,6 +63,8 @@ function MyInput({
63
63
  uppercase = false,
64
64
  lowercase = false,
65
65
  firstUppercase = false,
66
+ min = null,
67
+ max = null,
66
68
  onChange = null,
67
69
  onBlur = null,
68
70
  onFocus = null,
@@ -202,6 +204,9 @@ function MyInput({
202
204
 
203
205
  // Eğer değer değişmediyse güncelleme yapma
204
206
  if (newValue === myValue) return;
207
+ if (type == MyInputType.NUMBER && newValue) {
208
+ if (min && newValue < min) newValue = "";else if (max && newValue > max) newValue = "";
209
+ }
205
210
  if (type === MyInputType.TEXT || type === MyInputType.TEXTAREA) {
206
211
  newValue = newValue.trim();
207
212
  if (uppercase) newValue = newValue.toLocaleUpperCase("TR");else if (lowercase) newValue = newValue.toLocaleLowerCase("TR");else if (firstUppercase) newValue = newValue.split(' ').map(word => word.charAt(0).toLocaleUpperCase("TR") + word.slice(1).toLocaleLowerCase("TR")).join(' ');
@@ -499,6 +504,8 @@ function MyInput({
499
504
  onChange: handleChange,
500
505
  placeholder: placeholder,
501
506
  autoComplete: "off",
507
+ min: min,
508
+ max: max,
502
509
  style: style,
503
510
  onBlur: onMyBlur,
504
511
  onFocus: onMyFocus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "px-react-ui-components",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "commonjs",