ywana-core8 0.0.756 → 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.umd.js CHANGED
@@ -1713,7 +1713,9 @@
1713
1713
  outlined = props.outlined,
1714
1714
  _props$expanded = props.expanded,
1715
1715
  expanded = _props$expanded === void 0 ? false : _props$expanded,
1716
- className = props.className;
1716
+ className = props.className,
1717
+ _props$emptyMessage = props.emptyMessage,
1718
+ emptyMessage = _props$emptyMessage === void 0 ? "No Results Found" : _props$emptyMessage;
1717
1719
 
1718
1720
  var _useState = React.useState({}),
1719
1721
  sortDir = _useState[0],
@@ -1852,7 +1854,7 @@
1852
1854
  className: "empty-message"
1853
1855
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
1854
1856
  icon: "search_off"
1855
- }), /*#__PURE__*/React__default["default"].createElement(Text, null, "No Result Found")))))));
1857
+ }), /*#__PURE__*/React__default["default"].createElement(Text, null, emptyMessage)))))));
1856
1858
  };
1857
1859
  /**
1858
1860
  * DataTable Row
@@ -1924,7 +1926,8 @@
1924
1926
  max = column.max,
1925
1927
  _onChange = column.onChange,
1926
1928
  format = column.format,
1927
- options = column.options;
1929
+ options = column.options,
1930
+ action = column.action;
1928
1931
 
1929
1932
  if (id === "checked") {
1930
1933
  return /*#__PURE__*/React__default["default"].createElement(CheckBox, {
@@ -2047,7 +2050,8 @@
2047
2050
  id: id,
2048
2051
  value: cell,
2049
2052
  format: format,
2050
- options: options
2053
+ options: options,
2054
+ action: action
2051
2055
  });
2052
2056
 
2053
2057
  default:
@@ -2150,15 +2154,21 @@
2150
2154
 
2151
2155
 
2152
2156
  var StringCellViewer = function StringCellViewer(_ref7) {
2153
- var value = _ref7.value,
2157
+ var id = _ref7.id,
2158
+ value = _ref7.value,
2154
2159
  format = _ref7.format,
2155
- options = _ref7.options;
2160
+ options = _ref7.options,
2161
+ action = _ref7.action;
2156
2162
 
2157
2163
  function buildOptions() {
2158
2164
  var opts = typeof options === 'function' ? options() : options;
2159
2165
  return opts;
2160
2166
  }
2161
2167
 
2168
+ function onClick() {
2169
+ if (action) action(id, value, format, options);
2170
+ }
2171
+
2162
2172
  var option = options ? buildOptions().find(function (o) {
2163
2173
  return o.value === value;
2164
2174
  }) : null;
@@ -2184,7 +2194,8 @@
2184
2194
 
2185
2195
  case FORMATS$1.IMG:
2186
2196
  text = /*#__PURE__*/React__default["default"].createElement("img", {
2187
- src: text
2197
+ src: text,
2198
+ onClick: onClick
2188
2199
  });
2189
2200
  break;
2190
2201