ywana-core8 0.0.757 → 0.0.758

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.cjs CHANGED
@@ -1932,7 +1932,8 @@ var DataTableCell = function DataTableCell(_ref4) {
1932
1932
  max = column.max,
1933
1933
  _onChange = column.onChange,
1934
1934
  format = column.format,
1935
- options = column.options;
1935
+ options = column.options,
1936
+ action = column.action;
1936
1937
 
1937
1938
  if (id === "checked") {
1938
1939
  return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2055,7 +2056,8 @@ var DataTableCell = function DataTableCell(_ref4) {
2055
2056
  id: id,
2056
2057
  value: cell,
2057
2058
  format: format,
2058
- options: options
2059
+ options: options,
2060
+ action: action
2059
2061
  });
2060
2062
 
2061
2063
  default:
@@ -2158,15 +2160,21 @@ var BooleanCellViewer = function BooleanCellViewer(_ref6) {
2158
2160
 
2159
2161
 
2160
2162
  var StringCellViewer = function StringCellViewer(_ref7) {
2161
- var value = _ref7.value,
2163
+ var id = _ref7.id,
2164
+ value = _ref7.value,
2162
2165
  format = _ref7.format,
2163
- options = _ref7.options;
2166
+ options = _ref7.options,
2167
+ action = _ref7.action;
2164
2168
 
2165
2169
  function buildOptions() {
2166
2170
  var opts = typeof options === 'function' ? options() : options;
2167
2171
  return opts;
2168
2172
  }
2169
2173
 
2174
+ function onClick() {
2175
+ if (action) action(id, value, format, options);
2176
+ }
2177
+
2170
2178
  var option = options ? buildOptions().find(function (o) {
2171
2179
  return o.value === value;
2172
2180
  }) : null;
@@ -2192,7 +2200,8 @@ var StringCellViewer = function StringCellViewer(_ref7) {
2192
2200
 
2193
2201
  case FORMATS$1.IMG:
2194
2202
  text = /*#__PURE__*/React__default["default"].createElement("img", {
2195
- src: text
2203
+ src: text,
2204
+ onClick: onClick
2196
2205
  });
2197
2206
  break;
2198
2207