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.
@@ -1924,7 +1924,8 @@ var DataTableCell = function DataTableCell(_ref4) {
1924
1924
  max = column.max,
1925
1925
  _onChange = column.onChange,
1926
1926
  format = column.format,
1927
- options = column.options;
1927
+ options = column.options,
1928
+ action = column.action;
1928
1929
 
1929
1930
  if (id === "checked") {
1930
1931
  return /*#__PURE__*/React.createElement(CheckBox, {
@@ -2047,7 +2048,8 @@ var DataTableCell = function DataTableCell(_ref4) {
2047
2048
  id: id,
2048
2049
  value: cell,
2049
2050
  format: format,
2050
- options: options
2051
+ options: options,
2052
+ action: action
2051
2053
  });
2052
2054
 
2053
2055
  default:
@@ -2150,15 +2152,21 @@ var BooleanCellViewer = function BooleanCellViewer(_ref6) {
2150
2152
 
2151
2153
 
2152
2154
  var StringCellViewer = function StringCellViewer(_ref7) {
2153
- var value = _ref7.value,
2155
+ var id = _ref7.id,
2156
+ value = _ref7.value,
2154
2157
  format = _ref7.format,
2155
- options = _ref7.options;
2158
+ options = _ref7.options,
2159
+ action = _ref7.action;
2156
2160
 
2157
2161
  function buildOptions() {
2158
2162
  var opts = typeof options === 'function' ? options() : options;
2159
2163
  return opts;
2160
2164
  }
2161
2165
 
2166
+ function onClick() {
2167
+ if (action) action(id, value, format, options);
2168
+ }
2169
+
2162
2170
  var option = options ? buildOptions().find(function (o) {
2163
2171
  return o.value === value;
2164
2172
  }) : null;
@@ -2184,7 +2192,8 @@ var StringCellViewer = function StringCellViewer(_ref7) {
2184
2192
 
2185
2193
  case FORMATS$1.IMG:
2186
2194
  text = /*#__PURE__*/React.createElement("img", {
2187
- src: text
2195
+ src: text,
2196
+ onClick: onClick
2188
2197
  });
2189
2198
  break;
2190
2199