You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Table component was created, the initial goal was to generate HTML markup that is 508 compliant, while allowing developers the ability to use those pieces in ways deemed fit for their application, including features like sorting and pagination.
This led to the existing table example that demonstrated how it could be used leveraging a global TableWrapper context.
While informative in showing how the features can be used, also led to developers needing to implement their own TableWrapper component in addition to importing the component pieces from the React component library.
It's been apparent from initial feedback and discussions that the table component should be simpler to use without needing to instantiate a table context in addition to constructing the table.
Proposed Usage
Allow developers to provide their data, and well as describe how to access and display values. If no child components are provided to the component, the library should fallback to a default rendering view.
Table.propTypes={data: PropTypes.arrayOf(PropTypes.object).isRequired,// The table datacolumns: PropTypes.arrayOf(PropTypes.shape({// Column definitionskey: PropTypes.string.isRequired,// Key for the data fieldlabel: PropTypes.string.isRequired,// Column header labelsortable: PropTypes.bool,// Indicates if the column is sortablehidden: PropTypes.bool// Indicates if the column should be hidden})).isRequired,onSort: PropTypes.func,// Callback function for sortingpaginationComponent: PropTypes.element,// Custom pagination componentpaginationOptions: PropTypes.shape({// Options for paginationpageSize: PropTypes.number,currentPage: PropTypes.number,onPageChange: PropTypes.func// Callback function when page changes})};
When the Table component was created, the initial goal was to generate HTML markup that is 508 compliant, while allowing developers the ability to use those pieces in ways deemed fit for their application, including features like sorting and pagination.
This led to the existing table example that demonstrated how it could be used leveraging a global TableWrapper context.
While informative in showing how the features can be used, also led to developers needing to implement their own TableWrapper component in addition to importing the component pieces from the React component library.
It's been apparent from initial feedback and discussions that the table component should be simpler to use without needing to instantiate a table context in addition to constructing the table.
Proposed Usage
Allow developers to provide their data, and well as describe how to access and display values. If no child components are provided to the component, the library should fallback to a default rendering view.
Simple
Pagination Support
Additionally, the Table component should support pagination if requested by the developer.
The text was updated successfully, but these errors were encountered: