Skip to content

Commit a2aa404

Browse files
authored
Merge pull request #5308 from wenzhixin/develop
1.18.0
2 parents 6132f50 + 6755a1a commit a2aa404

File tree

96 files changed

+1358
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1358
-561
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
node_modules
22
bower_components
33

4+
# Tools
5+
tools/bootstrap-table-examples
6+
47
# docs site
58
_gh_pages
69

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
node_js:
1010
- 12
1111
name: "Lint src and check docs"
12-
before_install:
12+
script:
1313
- cd tools
1414
- git clone --depth=1 https://github.com/wenzhixin/bootstrap-table-examples
15-
script: npm run pre-commit
15+
- npm run pre-commit
1616
if: branch != master AND type = pull_request
1717

1818
- stage: deploy

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
ChangeLog
22
---------
33

4+
### 1.18.0
5+
6+
#### Core
7+
8+
- **New(option):** Added `buttons` to add custom buttons to the button bar.
9+
- **New(option):** Added `footerField` to support `server` side pagination.
10+
- **New(option):** Added new parameter `value` to `footerFormatter`.
11+
- **New(option):** Added `searchHighlight` and `searchHighlightFormatter`.
12+
- **New(option):** Added `searchSelector` to custom the search input.
13+
- **New(event):** Added `BootstrapTable` object as last parameter to all `event`.
14+
- **New(css):** Added CSS transitions for loading style.
15+
- **New:** Added support for `style` attribute of `tr` or `td`.
16+
- **New:** Added ability to use `colspan` in the footer.
17+
- **Update:** Updated search input type from `text` to `search`.
18+
- **Update:** Fixed `normalize` not string bug when using `searchAccentNeutralise`.
19+
- **Update:** Fixed complex group header bug.
20+
- **Update:** Fixed `resize` and `scroll` event bug with multiple tables.
21+
- **Update:** Fixed `getScrollPosition` bug when using group-by extension.
22+
- **Update:** Fixed `updateRow` with `customSearch` and `sortReset` bug.
23+
- **Update:** Fixed `colspan` and `mergeCell` bug when using `detailFormatter`.
24+
- **Update:** Fixed `init` bug when using `onPostBody`.
25+
- **Update:** Fixed sort bug when the `field` is set to `0`.
26+
- **Update:** Fixed `showFooter` display bug after resize table width.
27+
- **Update:** Fixed not update selected rows bug when using `checkAll`/`uncheckAll`.
28+
- **Update:** Fixed `checked` property bug using `formatter` when the field has a value.
29+
- **Update:** Fixed default data shared bug with multiple tables.
30+
- **Remove(method):** Removed `getAllSelections` method.
31+
32+
#### Extensions
33+
34+
- **New(addrbar):** Added support for `client` side pagination.
35+
- **New(cookie):** Added `cookieSameSite` option to prevent breaking changes.
36+
- **New(group-by):** Added `groupByToggle` and `groupByShowToggleIcon` options.
37+
- **New(group-by):** Added `groupByCollapsedGroups` option to allow collapse groups.
38+
- **Update(cookie):** Fixed cookie size is too big bug when saving columns.
39+
- **Update(cookie):** Fixed checkbox column disappears bug.
40+
- **Update(export):** Fixed cannot export `all` data bug with pagination.
41+
- **Update(group-by):** Fixed `scrollTo` not working properly bug.
42+
- **Update(multiple-sort):** Fixed cannot work bug.
43+
- **Update(sticky-header):** Fixed vertical scroll cannot work bug.
44+
445
### 1.17.1
546

647
#### Core

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
[![Build Status](https://travis-ci.org/wenzhixin/bootstrap-table.svg)](https://travis-ci.org/wenzhixin/bootstrap-table)
44
[![GitHub version](https://badge.fury.io/gh/wenzhixin%2Fbootstrap-table.svg)](http://badge.fury.io/gh/wenzhixin%2Fbootstrap-table)
5-
[![Bower version](https://badge.fury.io/bo/bootstrap-table.svg)](http://badge.fury.io/bo/bootstrap-table)
6-
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/bootstrap-table/badge?style=rounded)](https://www.jsdelivr.com/package/npm/bootstrap-table)
75
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDHP676FQDUT6)
86
[![Backers on Open Collective](https://opencollective.com/bootstrap-table/backers/badge.svg)](#backers)
97
[![Sponsors on Open Collective](https://opencollective.com/bootstrap-table/sponsors/badge.svg)](#sponsors)
8+
[![Package Quality](https://npm.packagequality.com/shield/bootstrap-table.svg)](https://packagequality.com/#?package=bootstrap-table)
109

1110
An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.
1211

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
"rollup-plugin-inject": "^3.0.0",
2828
"rollup-plugin-multi-entry": "^2.1.0",
2929
"rollup-plugin-node-resolve": "^5.0.4",
30-
"rollup-plugin-terser": "^6.1.0",
30+
"rollup-plugin-terser": "^7.0.0",
3131
"rollup-plugin-vue": "5.1.9",
32-
"safe-eval": "^0.4.1",
3332
"stylelint": "^13.3.3",
3433
"stylelint-config-standard": "^20.0.0",
3534
"vue-template-compiler": "^2.6.10"

site/docs/api/column-options.md

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,15 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
225225

226226
The context (this) is the column Object.
227227

228-
The function, take one parameter:
228+
The function, takes two parameters:
229229

230-
* `data`: Array of all the data rows.
230+
* `data`: Array of all the data rows.
231+
* `value`: If footer data is set, the value of the footer column.
231232

232233
the function should return a string with the text to show in the footer cell.
233234

235+
If you fetch data from a server and tries to set the footer value from the server response, please use the `footerField` Option.
236+
234237
- **Default:** `undefined`
235238

236239
- **Example:** [Footer Formatter](https://examples.bootstrap-table.com/#column-options/footer-formatter.html)
@@ -315,6 +318,20 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
315318

316319
- **Example:** [Rowspan Colspan](https://examples.bootstrap-table.com/#column-options/rowspan-colspan.html)
317320

321+
## searchable
322+
323+
- **Attribute:** `data-searchable`
324+
325+
- **Type:** `Boolean`
326+
327+
- **Detail:**
328+
329+
Set `true` to search data for this column.
330+
331+
- **Default:** `true`
332+
333+
- **Example:** [Column Searchable](https://examples.bootstrap-table.com/#column-options/searchable.html)
334+
318335
## searchFormatter
319336

320337
- **Attribute:** `data-search-formatter`
@@ -329,19 +346,19 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
329346

330347
- **Example:** [Search Formatter](https://examples.bootstrap-table.com/#column-options/search-formatter.html)
331348

332-
## searchable
349+
## searchHighlightFormatter
333350

334-
- **Attribute:** `data-searchable`
351+
- **Attribute:** `data-search-highlight-formatter`
335352

336-
- **Type:** `Boolean`
353+
- **Type:** `Boolean|Function`
337354

338355
- **Detail:**
339356

340-
Set `true` to search data for this column.
357+
Define a `function` to use a custom highlight formatter for the [search highlight](https://bootstrap-table.com/docs/api/table-options/#searchhighlight) option.
341358

342359
- **Default:** `true`
343360

344-
- **Example:** [Column Searchable](https://examples.bootstrap-table.com/#column-options/searchable.html)
361+
- **Example:** [Searchable Highlight Formatter](https://examples.bootstrap-table.com/#column-options/search-highlight-formatter.html)
345362

346363
## showSelectTitle
347364

@@ -357,20 +374,6 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
357374

358375
- **Example:** [Show Select Title](https://examples.bootstrap-table.com/#column-options/show-select-title.html)
359376

360-
## sortName
361-
362-
- **Attribute:** `data-sort-name`
363-
364-
- **Type:** `String`
365-
366-
- **Detail:**
367-
368-
Provide a customizable sort-name, not the default sort-name in the header, or the field name of the column. For example, a column might display the value of fieldName of 'html' such as `<b><span style="color:red">abc</span></b>`, but a fieldName to sort is 'content' with the value of `'abc'`.
369-
370-
- **Default:** `undefined`
371-
372-
- **Example:** [Sort Name Order](https://examples.bootstrap-table.com/#column-options/sort-name-order.html)
373-
374377
## sortable
375378

376379
- **Attribute:** `data-sortable`
@@ -406,6 +409,20 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
406409

407410
- **Example:** [Column Sorter](https://examples.bootstrap-table.com/#column-options/sorter.html)
408411

412+
## sortName
413+
414+
- **Attribute:** `data-sort-name`
415+
416+
- **Type:** `String`
417+
418+
- **Detail:**
419+
420+
Provide a customizable sort-name, not the default sort-name in the header, or the field name of the column. For example, a column might display the value of fieldName of 'html' such as `<b><span style="color:red">abc</span></b>`, but a fieldName to sort is 'content' with the value of `'abc'`.
421+
422+
- **Default:** `undefined`
423+
424+
- **Example:** [Sort Name Order](https://examples.bootstrap-table.com/#column-options/sort-name-order.html)
425+
409426
## switchable
410427

411428
- **Attribute:** `data-switchable`

site/docs/api/events.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ toc: true
99
To use event syntax:
1010

1111
{% highlight html %}
12+
// Here you can expect to have as last parameter the boostrap-table object
13+
1214
$('#table').bootstrapTable({
1315
onEventName: function (arg1, arg2, ...) {
1416
// ...
1517
}
1618
})
1719

20+
// Here you can expect to have in the 'e' variable the sender property which is the boostrap-table object
21+
1822
$('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
1923
// ...
2024
})

site/docs/api/localizations.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ $('#table').bootstrapTable({
125125

126126
- **Default:** `'Refresh'`
127127

128+
## formatSearch
129+
130+
- **Parameter:** `undefined`
131+
132+
- **Default:** `'Search'`
133+
134+
## formatShowingRows
135+
136+
- **Parameter:** `pageFrom, pageTo, totalRows`
137+
138+
- **Default:** `'Showing %s to %s of %s rows'`
139+
128140
## formatSRPaginationNextText
129141

130142
- **Parameter:** `undefined`
@@ -143,18 +155,6 @@ $('#table').bootstrapTable({
143155

144156
- **Default:** `'previous page'`
145157

146-
## formatSearch
147-
148-
- **Parameter:** `undefined`
149-
150-
- **Default:** `'Search'`
151-
152-
## formatShowingRows
153-
154-
- **Parameter:** `pageFrom, pageTo, totalRows`
155-
156-
- **Default:** `'Showing %s to %s of %s rows'`
157-
158158
## formatToggle
159159

160160
- **Parameter:** `undefined`

site/docs/api/methods.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,6 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
167167

168168
- **Example:** [Filter By](https://examples.bootstrap-table.com/#methods/filter-by.html)
169169

170-
## getAllSelections
171-
172-
- **Parameter:** `undefined`
173-
174-
- **Detail:**
175-
176-
Return all selected rows contain search or filter, when no record selected, an empty array will return.
177-
178-
- **Example:** [Get All Selections](https://examples.bootstrap-table.com/#methods/get-all-selections.html)
179-
180170
## getData
181171

182172
- **Parameter:** `params`
@@ -249,6 +239,7 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter)`.
249239
- **Detail:**
250240

251241
Return selected rows, when no record selected, an empty array will return.
242+
The selected rows will be unselected while some actions happens e.g. searching or page change, if you want to maintain the selections please use [maintainMetaData](https://bootstrap-table.com/docs/api/table-options/#maintainmetadata).
252243

253244
- **Example:** [Get Selections](https://examples.bootstrap-table.com/#methods/get-selections.html)
254245

0 commit comments

Comments
 (0)