px-react-ui-components 1.0.20 → 1.0.22
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.
|
@@ -170,30 +170,48 @@ function MyInput({
|
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
e.target.value = myValue;
|
|
174
|
+
e.value = myValue;
|
|
173
175
|
if (onBlur != null) onBlur(e);
|
|
174
176
|
};
|
|
175
177
|
const onMyFocus = e => {
|
|
178
|
+
e.target.value = myValue;
|
|
179
|
+
e.value = myValue;
|
|
176
180
|
if (onFocus != null) onFocus(e);
|
|
177
181
|
};
|
|
178
182
|
const onMyKeyDown = e => {
|
|
183
|
+
e.target.value = myValue;
|
|
184
|
+
e.value = myValue;
|
|
179
185
|
if (onKeyDown != null) onKeyDown(e);
|
|
180
186
|
};
|
|
181
187
|
const onMyKeyUp = e => {
|
|
188
|
+
e.target.value = myValue;
|
|
189
|
+
e.value = myValue;
|
|
182
190
|
if (onKeyUp != null) onKeyUp(e);
|
|
183
191
|
};
|
|
184
192
|
const onMyKeyPress = e => {
|
|
193
|
+
e.target.value = myValue;
|
|
194
|
+
e.value = myValue;
|
|
185
195
|
if (onKeyPress != null) onKeyPress(e);
|
|
186
196
|
};
|
|
187
197
|
const onMyMouseDown = e => {
|
|
198
|
+
e.target.value = myValue;
|
|
199
|
+
e.value = myValue;
|
|
188
200
|
if (onMouseDown != null) onMouseDown(e);
|
|
189
201
|
};
|
|
190
202
|
const onMyMouseUp = e => {
|
|
203
|
+
e.target.value = myValue;
|
|
204
|
+
e.value = myValue;
|
|
191
205
|
if (onMouseUp != null) onMouseUp(e);
|
|
192
206
|
};
|
|
193
207
|
const onMyMouseEnter = e => {
|
|
208
|
+
e.target.value = myValue;
|
|
209
|
+
e.value = myValue;
|
|
194
210
|
if (onMouseEnter != null) onMouseEnter(e);
|
|
195
211
|
};
|
|
196
212
|
const onMyMouseLeave = e => {
|
|
213
|
+
e.target.value = myValue;
|
|
214
|
+
e.value = myValue;
|
|
197
215
|
if (onMouseLeave != null) onMouseLeave(e);
|
|
198
216
|
};
|
|
199
217
|
const onRemoveImageClick = e => {
|
|
@@ -204,12 +222,12 @@ function MyInput({
|
|
|
204
222
|
|
|
205
223
|
// Eğer değer değişmediyse güncelleme yapma
|
|
206
224
|
if (newValue === myValue) return;
|
|
207
|
-
if (type === MyInputType.NUMBER) {
|
|
225
|
+
if (type === MyInputType.NUMBER && newValue) {
|
|
208
226
|
// Sadece 0-9 arası rakamlara izin ver
|
|
209
227
|
newValue = newValue.replace(/[^0-9]/g, '');
|
|
210
228
|
|
|
211
229
|
// min ve max kontrolü
|
|
212
|
-
if (min && newValue < min) newValue = min
|
|
230
|
+
if (min && newValue < min) newValue = min;else if (max && newValue > max) newValue = max;
|
|
213
231
|
}
|
|
214
232
|
if (type === MyInputType.TEXT || type === MyInputType.TEXTAREA) {
|
|
215
233
|
newValue = newValue.trim();
|
|
@@ -503,7 +521,7 @@ function MyInput({
|
|
|
503
521
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
504
522
|
ref: ref,
|
|
505
523
|
id: id,
|
|
506
|
-
type: "
|
|
524
|
+
type: "text",
|
|
507
525
|
value: myValue,
|
|
508
526
|
onChange: handleChange,
|
|
509
527
|
placeholder: placeholder,
|