@visns-studio/visns-components 1.8.1 → 1.8.3
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.
|
@@ -220,9 +220,16 @@ const DataGrid = forwardRef(
|
|
|
220
220
|
case "delete":
|
|
221
221
|
confirmAlert({
|
|
222
222
|
title: "Delete Item",
|
|
223
|
-
message:
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
message:
|
|
224
|
+
s.description && s.description !== ""
|
|
225
|
+
? s.description
|
|
226
|
+
: `Are you sure you want to delete ${
|
|
227
|
+
d.name
|
|
228
|
+
? d.name
|
|
229
|
+
: d.label
|
|
230
|
+
? d.label
|
|
231
|
+
: "this item"
|
|
232
|
+
}?`,
|
|
226
233
|
buttons: [
|
|
227
234
|
{
|
|
228
235
|
label: "Yes",
|
|
@@ -425,7 +432,12 @@ const DataGrid = forwardRef(
|
|
|
425
432
|
onChange={handleChangeSearch}
|
|
426
433
|
/>
|
|
427
434
|
</div>
|
|
428
|
-
) :
|
|
435
|
+
) : (
|
|
436
|
+
<div
|
|
437
|
+
className="filterInput--alt"
|
|
438
|
+
style={{ height: "37px" }}
|
|
439
|
+
></div>
|
|
440
|
+
);
|
|
429
441
|
};
|
|
430
442
|
|
|
431
443
|
const handleCoding = (c, data) => {
|
|
@@ -315,7 +315,10 @@ function Form(props) {
|
|
|
315
315
|
if (["create", "update"].includes(formType)) {
|
|
316
316
|
fields.forEach((item) => {
|
|
317
317
|
if (item.required === true) {
|
|
318
|
-
if (
|
|
318
|
+
if (
|
|
319
|
+
formData[item.id] === "" ||
|
|
320
|
+
formData[item.id] === undefined
|
|
321
|
+
) {
|
|
319
322
|
if (
|
|
320
323
|
item.hasOwnProperty("required_check") &&
|
|
321
324
|
item.required_check !== ""
|
|
@@ -368,7 +371,6 @@ function Form(props) {
|
|
|
368
371
|
" is a required field.<br/>"
|
|
369
372
|
)
|
|
370
373
|
) {
|
|
371
|
-
console.info(item.label, item.id, formData);
|
|
372
374
|
validation +=
|
|
373
375
|
item.label +
|
|
374
376
|
" is a required field.<br/>";
|
package/package.json
CHANGED