react-better-html 1.1.108 → 1.1.109

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.mjs CHANGED
@@ -6934,12 +6934,19 @@ var TableComponent = forwardRef15(function Table({
6934
6934
  return column.render?.(item, index) ?? /* @__PURE__ */ jsx20(Fragment5, {});
6935
6935
  }
6936
6936
  case "image": {
6937
- const { type, keyName, ...props2 } = column;
6938
- const src = keyName ? item[keyName] : void 0;
6939
- return /* @__PURE__ */ jsx20(Image_default, { src, width: defaultImageWidth, borderRadius: theme2.styles.borderRadius / 2, ...props2 });
6937
+ const src = column.getImageSrc?.(item, index) ?? (column.keyName ? item[column.keyName] : void 0);
6938
+ return /* @__PURE__ */ jsx20(
6939
+ Image_default,
6940
+ {
6941
+ src,
6942
+ width: defaultImageWidth,
6943
+ borderRadius: theme2.styles.borderRadius / 2,
6944
+ ...column.imageProps
6945
+ }
6946
+ );
6940
6947
  }
6941
6948
  case "checkbox": {
6942
- const { type, onChange, ...props2 } = column;
6949
+ const { onChange, ...toggleInputProps } = column.toggleInputProps ?? {};
6943
6950
  const checkedValue = checkedItems[index];
6944
6951
  return /* @__PURE__ */ jsx20(
6945
6952
  ToggleInput_default.checkbox,
@@ -6951,7 +6958,7 @@ var TableComponent = forwardRef15(function Table({
6951
6958
  );
6952
6959
  onChange?.(checked, value);
6953
6960
  },
6954
- ...props2
6961
+ ...toggleInputProps
6955
6962
  }
6956
6963
  );
6957
6964
  }