Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports column formatter options returns dom element or jquery element #7444

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
ChangeLog
---------

### 1.23.3

### Core

- **New:** Added support for column options `formatter` and `footerFormatter` methods returning type `jQuery`, `HTMLElement`.

### 1.23.2

### Core
Expand Down
4 changes: 3 additions & 1 deletion site/docs/api/column-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
* `data`: Array of all the data rows.
* `value`: If footer data is set, the value of the footer column.

The function should return a string with the text to show in the footer cell.
The expected return data type is `jQuery`, `String` or `HTMLElement`. Other types will be forced to the `String` type.

If you fetch data from a server and set the footer value from the server response, please use the `footerField` Option.

Expand Down Expand Up @@ -282,6 +282,8 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
* `index`: the row index.
* `field`: the row field.

The expected return data type is `jQuery`, `String` or `HTMLElement`. Other types will be forced to the `String` type.

- **Default:** `undefined`

- **Example:** [Column Formatter](https://examples.bootstrap-table.com/#column-options/formatter.html)
Expand Down
Loading
Loading