react-table-edit 0.9.2 → 0.9.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.
package/dist/index.js CHANGED
@@ -2553,6 +2553,9 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2553
2553
  valueSelect = row[col.field];
2554
2554
  } else {
2555
2555
  valueSelect = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? optionsSelect?.find((val) => val[col.selectSettings?.fieldValue ?? "value"] === row[col.field]) : "";
2556
+ if (!valueSelect && col.selectSettings?.defaultValue) {
2557
+ valueSelect = col.selectSettings?.defaultValue(row);
2558
+ }
2556
2559
  }
2557
2560
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2558
2561
  SelectTable,
package/dist/index.mjs CHANGED
@@ -2517,6 +2517,9 @@ var TableEdit = forwardRef3((props, ref) => {
2517
2517
  valueSelect = row[col.field];
2518
2518
  } else {
2519
2519
  valueSelect = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? optionsSelect?.find((val) => val[col.selectSettings?.fieldValue ?? "value"] === row[col.field]) : "";
2520
+ if (!valueSelect && col.selectSettings?.defaultValue) {
2521
+ valueSelect = col.selectSettings?.defaultValue(row);
2522
+ }
2520
2523
  }
2521
2524
  return /* @__PURE__ */ jsx15(
2522
2525
  SelectTable,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
3
  "license": "MIT",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",