{"id":29632756,"url":"https://github.com/thomasdev-de/bs-table","last_synced_at":"2025-07-21T13:03:40.114Z","repository":{"id":302585004,"uuid":"1005651213","full_name":"ThomasDev-de/bs-table","owner":"ThomasDev-de","description":"bs-table is a light and user-friendly table plugin developed for Bootstrap. Crafted with a minimalist approach, this plugin offers a straightforward, streamlined method to manage and interact with tables in a Bootstrap-based web environment.","archived":false,"fork":false,"pushed_at":"2025-07-09T20:49:24.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-10T06:53:00.427Z","etag":null,"topics":["bootstrap","client","configuration","jquery","pagination","server","table"],"latest_commit_sha":null,"homepage":"https://github.webcito.de/#bs-table","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasDev-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T15:17:17.000Z","updated_at":"2025-07-09T20:49:27.000Z","dependencies_parsed_at":"2025-07-03T17:33:54.071Z","dependency_job_id":null,"html_url":"https://github.com/ThomasDev-de/bs-table","commit_stats":null,"previous_names":["thomasdev-de/bs-table"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ThomasDev-de/bs-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fbs-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fbs-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fbs-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fbs-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasDev-de","download_url":"https://codeload.github.com/ThomasDev-de/bs-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasDev-de%2Fbs-table/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266305285,"owners_count":23908416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","client","configuration","jquery","pagination","server","table"],"created_at":"2025-07-21T13:03:34.536Z","updated_at":"2025-07-21T13:03:40.092Z","avatar_url":"https://github.com/ThomasDev-de.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# bs-table\n\n**bs-table** is a lightweight and user-friendly table plugin for Bootstrap, designed to efficiently manage tables with a streamlined configuration and extensive customization options.\n\n---\n\n## Table Options Reference\n\nBelow is the **complete list** of options available for **bs-table** with detailed explanations for each.\n\n---\n\n### General Table Options\n\n| **Option**               | **Type**               | **Default**                        | **Description**                                                                                              |\n|--------------------------|------------------------|------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| `classes`                | `string | object`     | `'table'`                          | CSS classes for the table. Can target specific elements like `thead`, `tbody`, or `tfoot`.                   |\n| `toolbar`                | `string | $`          | `null`                             | Selector or jQuery object for the toolbar.                                                                  |\n| `pagination`             | `boolean`             | `false`                            | Enables/disables pagination controls.                                                                       |\n| `sidePagination`         | `string`              | `'client'`                         | Determines if pagination is done on `'client'` or `'server'`.                                               |\n| `paginationVAlign`       | `string`              | `'bottom'`                         | Vertical alignment: `'top'`, `'bottom'`, or `'both'`.                                                       |\n| `paginationHAlign`       | `string`              | `'end'`                            | Horizontal alignment: `'start'` or `'end'`.                                                                 |\n| `pageNumber`             | `number`              | `1`                                | Initial page number when table loads.                                                                       |\n| `pageSize`               | `number`              | `10`                               | Number of rows per page.                                                                                    |\n| `pageList`               | `array\u003cnumber\u003e`       | `[5, 10, 25, 50, 100, 200, 'All']` | Dropdown options for the number of rows per page.                                                           |\n| `search`                 | `boolean`             | `false`                            | Adds a search bar for filtering rows.                                                                       |\n| `url`                    | `string | function`   | `null`                             | Source of data for the table. Accepts an API endpoint or a function returning a Promise.                     |\n| `data`                   | `array`               | `null`                             | Static array of data objects. Overrides `url` if defined.                                                   |\n| `debug`                  | `boolean`             | `false`                            | Enables debugging mode, which logs events and table interactions.                                           |\n\n---\n\n### Sorting Options\n\n| **Option**               | **Type**               | **Default**  | **Description**                                                                                      |\n|--------------------------|------------------------|--------------|------------------------------------------------------------------------------------------------------|\n| `sortName`               | `string`              | `null`       | Specifies the data field to sort by on table initialization.                                         |\n| `sortOrder`              | `string`              | `'asc'`      | Default sorting order. Possible values are `'asc'` (ascending) or `'desc'` (descending).             |\n| `onSort`                 | `function`            |              | Callback triggered when a column is sorted. Receives `field` and `order` as arguments.              |\n\n---\n\n### Advanced Features\n\n| **Option**               | **Type**               | **Default**                | **Description**                                                                                      |\n|--------------------------|------------------------|----------------------------|------------------------------------------------------------------------------------------------------|\n| `showFooter`             | `boolean`             | `false`                    | Displays a table footer.                                                                             |\n| `showHeader`             | `boolean`             | `true`                     | Controls the visibility of the table header.                                                        |\n| `formatNoMatches`        | `function`            | Custom HTML                | Message displayed when no matching rows are found.                                                  |\n| `showColumns`            | `boolean`             | `false`                    | Displays a dropdown for toggling column visibility.                                                 |\n| `minimumCountColumns`    | `number`              | `1`                        | Minimum number of visible columns when `showColumns` is enabled.                                    |\n| `customView`             | `boolean`             | `false`                    | Enables a custom rendering view for rows.                                                           |\n| `onCustomView`           | `function`            |                              | Callback function for rendering rows when `customView` is enabled.                                  |\n\n---\n\n### Column Options\n\nColumns are defined in the `columns` array. Each column object accepts the following options:\n\n| **Option**               | **Type**               | **Default**                | **Description**                                                                                      |\n|--------------------------|------------------------|----------------------------|------------------------------------------------------------------------------------------------------|\n| `field`                  | `string`              |                              | The data field to map onto this column.                                                             |\n| `title`                  | `string`              |                              | Header text for the column.                                                                         |\n| `sortable`               | `boolean`             | `false`                    | Enables sorting for this column.                                                                    |\n| `align`                  | `string`              | `'left'`                   | Horizontal alignment of column cells. Can be `'left'`, `'center'`, or `'right'`.                    |\n| `valign`                 | `string`              | `'top'`                    | Vertical alignment. Can be `'top'`, `'middle'`, or `'bottom'`.                                      |\n| `formatter`              | `function`            |                              | Function to customize the rendering of cell values.                                                 |\n| `width`                  | `string`              |                              | Sets the width of the column (e.g., `'100px'`).                                                     |\n| `checkbox`               | `boolean`             | `false`                    | Adds a checkbox to the column for selection purposes.                                               |\n| `radio`                  | `boolean`             | `false`                    | Adds a radio button to the column for row selection.                                                |\n\n---\n\n### Events\n\n`bs-table` provides rich event-driven functionalities. Below is a complete list of events:\n\n| **Event Name**           | **Callback Parameters**     | **Description**                                                                                     |\n|--------------------------|-----------------------------|-----------------------------------------------------------------------------------------------------|\n| `onAll`                  | `eventName, ...args`       | Global event that listens to all table actions.                                                    |\n| `onLoadSuccess`          | `(rows, $table)`           | Triggered when data is successfully loaded into the table.                                          |\n| `onLoadError`            |                             | Triggered when there is an error loading data into the table.                                       |\n| `onPreBody`              | `(rows, $table)`           | Triggered before the table body is rendered.                                                       |\n| `onPostBody`             | `(rows, $table)`           | Triggered after the table body rendering is complete.                                              |\n| `onClickCell`            | `(field, value, row, $td)` | Triggered when a specific cell is clicked.                                                         |\n| `onClickRow`             | `(row, $tr)`               | Triggered when a table row is clicked.                                                             |\n| `onSort`                 | `(field, order)`           | Triggered when a column is sorted.                                                                 |\n| `onRefresh`              |                             | Triggered when the table is refreshed through the refresh button.                                   |\n\n**Example: Event Listener**\n````javascript\n$('#example-table').on('click-row.bs.table', function (event, row, $tr) {\n    console.log('Row clicked:', row);\n});\n````\n\n---\n\n## How to Customize bs-table\n\n### Example Scenario: Full Feature Setup\n\n````javascript\n$('#example-table').bsTable({\n    search: true,\n    pagination: true,\n    pageSize: 15,\n    showColumns: true,\n    columns: [\n        {\n            field: 'id',\n            title: 'ID',\n            sortable: true,\n            align: 'center'\n        },\n        {\n            field: 'name',\n            title: 'Name',\n            formatter: value =\u003e `\u003cstrong\u003e${value}\u003c/strong\u003e`\n        },\n        {\n            field: 'description',\n            title: 'Description',\n            valign: 'middle'\n        }\n    ],\n    onClickRow: function (row, $tr) {\n        alert('Row clicked: ' + JSON.stringify(row));\n    }\n});\n````\n\n---\n\n## License\n\n**Proprietary**  \nContact the author for licensing inquiries.\n\n---\n\n## Author\n\n**Thomas Kirsch**  \nEmail: [t.kirsch@webcito.de](mailto:t.kirsch@webcito.de)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdev-de%2Fbs-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasdev-de%2Fbs-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasdev-de%2Fbs-table/lists"}