diff --git a/src/components/collections/PmGridCollection.jsx b/src/components/collections/PmGridCollection.jsx index 7b1f0605..a558a81f 100644 --- a/src/components/collections/PmGridCollection.jsx +++ b/src/components/collections/PmGridCollection.jsx @@ -76,14 +76,12 @@ const PmGridCollection = ({ selectedProject, fromDate, toDate, isPending }) => { ), })), - // MUST use totalRows only total: api.totalEntities, }; }; return ( { pinning: true, IsNumbering: true, grouping: true, + actions: [ + { + label: "Edit", + icon: "bx-edit ", + onClick: (row) => console.log("Edit", row), + }, + { + label: "Delete", + icon: "bx-trash text-danger", + onClick: (row) => console.log("Delete", row), + }, + + ] }} /> ); diff --git a/src/services/pmsGrid/PmsGrid.jsx b/src/services/pmsGrid/PmsGrid.jsx index e916216a..ebe81b06 100644 --- a/src/services/pmsGrid/PmsGrid.jsx +++ b/src/services/pmsGrid/PmsGrid.jsx @@ -18,6 +18,7 @@ export default function PmsGrid({ serverMode = false, fetcher, rowKey = "id", + isDropdown = false, features = {}, renderExpanded, }) { @@ -390,7 +391,7 @@ export default function PmsGrid({ {!loading && groupBy && groupedRows && groupedRows.length > 0 ? groupedRows.map((g) => ( - + -
- {Array.isArray(features.actions) - ? features.actions.map((act, i) => ( - +
+ + View details + + + + + ) : ( +
+ {Array.isArray(features.actions) + ? features.actions.map((act, i) => ( + + )) + : typeof features.actions === "function" + ? features.actions(row, toggleExpand) + : null} +
+ )} )} @@ -628,4 +660,4 @@ function ColumnVisibilityPanel({ columns, onToggle }) { ); } -// For Full screen - class card card-action card-fullscreen \ No newline at end of file +// For Full screen - class card card-action card-fullscreen