Skip to content

Commit

Permalink
Glide Data Grid v6
Browse files Browse the repository at this point in the history
  • Loading branch information
cristineguadelupe committed Apr 30, 2024
1 parent baaa84a commit 05aa361
Show file tree
Hide file tree
Showing 11 changed files with 1,536 additions and 256 deletions.
1,446 changes: 1,361 additions & 85 deletions assets/data_table/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/data_table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dev": "npm run build -- --watch --dev"
},
"dependencies": {
"@glideapps/glide-data-grid": "^5.3.2",
"@glideapps/glide-data-grid": "^6.0.3",
"@remixicon/react": "^4.1.1",
"lodash": "^4.17.21",
"marked": "^4.2.2",
Expand Down
8 changes: 4 additions & 4 deletions assets/data_table/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function App({ ctx, data }) {
const rows = content.page_length;

const drawHeader = useCallback(
(args) => {
(args, drawContent) => {
const {
ctx,
theme,
Expand Down Expand Up @@ -185,7 +185,8 @@ export function App({ ctx, data }) {
: theme.textHeader;
const fillInfoStyle = isSelected ? theme.accentLight : theme.textDark;
const shouldDrawMenu = column.hasMenu === true && isHovered;
const hasSummary = column.summary ? true : false;
const summary = content.columns[column.sourceIndex - 1].summary;
const hasSummary = summary ? true : false;

const fadeWidth = 35;
const fadeStart = rect.width - fadeWidth;
Expand Down Expand Up @@ -250,7 +251,6 @@ export function App({ ctx, data }) {
);

if (hasSummary) {
const summary = content.columns[column.sourceIndex - 1].summary;
const formattedSummary = Object.fromEntries(
summary.keys.map((k, i) => [k, summary.values[i]])
);
Expand Down Expand Up @@ -285,7 +285,7 @@ export function App({ ctx, data }) {
ctx.fill(p);
}

return true;
drawContent();
},
[content]
);
Expand Down
14 changes: 14 additions & 0 deletions lib/assets/data_table/build/chunk-2HCNYJTW.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05aa361

Please sign in to comment.