qbs-react-grid 1.3.4 → 1.3.5

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.
@@ -580,7 +580,12 @@ var QbsTable = function QbsTable(_ref) {
580
580
  maxHeight: !tableViewToggle ? height : '',
581
581
  minHeight: !tableViewToggle ? height : ''
582
582
  }
583
- }, isLoading ? /*#__PURE__*/React.createElement("div", {
583
+ }, ((data === null || data === void 0 ? void 0 : data.length) === 0 || !data) && !isLoading && /*#__PURE__*/React.createElement("div", {
584
+ className: "flex flex-col gap-2 p-2 "
585
+ }, /*#__PURE__*/React.createElement(NoData, {
586
+ title: emptyTitle != null ? emptyTitle : 'No Data Found',
587
+ subtitle: emptySubTitle
588
+ })), isLoading ? /*#__PURE__*/React.createElement("div", {
584
589
  className: "flex flex-col gap-2 p-2"
585
590
  }, /*#__PURE__*/React.createElement(CardLoader, null)) : data.map(function (items) {
586
591
  return /*#__PURE__*/React.createElement("div", {
@@ -586,7 +586,12 @@ var QbsTable = function QbsTable(_ref) {
586
586
  maxHeight: !tableViewToggle ? height : '',
587
587
  minHeight: !tableViewToggle ? height : ''
588
588
  }
589
- }, isLoading ? /*#__PURE__*/_react["default"].createElement("div", {
589
+ }, ((data === null || data === void 0 ? void 0 : data.length) === 0 || !data) && !isLoading && /*#__PURE__*/_react["default"].createElement("div", {
590
+ className: "flex flex-col gap-2 p-2 "
591
+ }, /*#__PURE__*/_react["default"].createElement(_empty["default"], {
592
+ title: emptyTitle != null ? emptyTitle : 'No Data Found',
593
+ subtitle: emptySubTitle
594
+ })), isLoading ? /*#__PURE__*/_react["default"].createElement("div", {
590
595
  className: "flex flex-col gap-2 p-2"
591
596
  }, /*#__PURE__*/_react["default"].createElement(_CardLoader["default"], null)) : data.map(function (items) {
592
597
  return /*#__PURE__*/_react["default"].createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qbs-react-grid",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "A React table component",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -634,6 +634,11 @@ const QbsTable: React.FC<QbsTableProps> = ({
634
634
  minHeight: !tableViewToggle ? height : ''
635
635
  }}
636
636
  >
637
+ {(data?.length === 0 || !data) && !isLoading && (
638
+ <div className="flex flex-col gap-2 p-2 ">
639
+ <NoData title={emptyTitle ?? 'No Data Found'} subtitle={emptySubTitle} />
640
+ </div>
641
+ )}
637
642
  {isLoading ? (
638
643
  <div className="flex flex-col gap-2 p-2">
639
644
  <CardLoader />