Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While HandsOnTable nicely provided the features we needed for a table, the library was problematic:
So we are replacing HandsOnTable with our own custom URTable.
URTable was originally built for Net.Create. See Resizable table columns
New Features
Sort order icons
By default the table is unsorted.
so re-selecting the column will restore the previous sort order
sortDisabled
totrue
API
Documentation from the original PR for reference:
Table rendering is implemented via three layers of components:
URTable.jsx
-- the base componentNCTable.jsx
-- a decorator component that adds additional renderers and sortersNCNodeTable.jsx
/NCEdgeTable.jsx
-- the final custom componentURTable.jsx
At the core is a generic
URTable.jsx
component that provides a simple table component with sorting and column resizing. This can be used with ANY table.NCTable.jsx
NCTable.jsx
provides Net.Create-specific sorters and renderers. Specifically, support for handlingmarkdown
andhdate
(historical date) data formats.NCTable.jsx
provides the features common to both Node and Edge tables.NCNodeTable.jsx
/NCEdgeTable.jsx
NCNodeTable.jsx
andNCEdgeTable.jsx
defines the table data for nodes and edges, specifying:Table Data
Table data is defined as a simple JSON object table, e.g.:
The table itself is defined via "Column definitions" that specify:
URTable can handle a number of built-in generic data types:
...along with some Net.Create-specific data types:
Column Sorters
Columns can be sorted ascending and descending using standard types: number, text.
Depending on the data format, dates can be handled and sorted as strings (e.g. "October 1, 2023") or numbers (e.g. if using unix timestamps).
In addition, custom sorters can be defined for specific data types.
Column Renderers
Standard data types will display text as-is.
If the data requires special handling, you need to define a custom renderer. For example, you can use a custom renderer to show a button or an image based on the table data.
For example, table data
{ id: 0, url: 'http://www.inquirium.net' }
you can use theurl
to render a clickable button.To Do