Skip to content

Commit

Permalink
add a more robust data table that allows filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
skhamis committed Jan 12, 2023
1 parent 9fa02e5 commit 2b05171
Show file tree
Hide file tree
Showing 5 changed files with 428 additions and 25 deletions.
6 changes: 6 additions & 0 deletions data/aboutsync.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ html {
cursor: pointer;
}

.filterHeader {
inline-size: 100%;
padding: 4px;
font-size: 14px;
}

/* =============================================================================
Panel and PanelGroup
============================================================================= */
Expand Down
124 changes: 100 additions & 24 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
]
},
"dependencies": {
"@tanstack/react-table": "^8.7.4",
"classnames": "^2.2.5",
"json-stringify-safe": "^5.0.1",
"prop-types": "^15.6.0",
"react": "^18.2.0",
"react-data-grid": "^7.0.0-beta.20",
"react-dom": "^18.2.0",
"react-dom-factories": "^1.0.2",
"react-inspector": "^6.0.1",
Expand Down
3 changes: 2 additions & 1 deletion src/CollectionsViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const { PlacesSqlView, promiseSql } = require("./PlacesSqlView");
const { BookmarkValidator } = require("./bookmarkValidator");

const validation = require("./validation");
const {default: DynamicTableView} = require("./components/DynamicTableView");

const { Weave } = importLocal("resource://services-sync/main.js");
const { AddonValidator } = importLocal("resource://services-sync/engines/addons.js");
Expand Down Expand Up @@ -260,7 +261,7 @@ class CollectionViewer extends React.Component {
</TabPanel>

<TabPanel name="Records (table)" key="records-table">
<TableInspector data={this.state.records}/>
<DynamicTableView data={this.state.records} />
</TabPanel>

<TabPanel name="Records (object)" key="records-object">
Expand Down
Loading

0 comments on commit 2b05171

Please sign in to comment.