index.html 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <meta name="description" content="The Methods API of Bootstrap Table.">
  7. <meta name="author" content="Zhixin Wen, and Bootstrap Table contributors">
  8. <meta name="generator" content="Jekyll v3.8.7">
  9. <meta name="keywords" content="bootstrap,table,pagination,checkbox,radio,datatables,css,css-framework,semantic,semantic-ui,bulma,material,material-design,materialize,foundation">
  10. <meta name="docsearch:language" content="en">
  11. <title>Methods · Bootstrap Table</title>
  12. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"><!-- Documentation extras -->
  13. <link href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" rel="stylesheet">
  14. <link href="/assets/css/docs.min.css" rel="stylesheet">
  15. <link href="/assets/css/style.css?m=9" rel="stylesheet">
  16. <!-- Favicons -->
  17. <link rel="icon" href="/favicon.png">
  18. <script type="text/javascript">
  19. if (window !== top) // 判断当前的 window 对象是否是 top 对象
  20. top.location.href = window.location.href // 如果不是,将 top 对象的网址自动导向被嵌入网页的网址
  21. </script>
  22. </head>
  23. <body>
  24. <a class="skippy sr-only sr-only-focusable" href="#content">
  25. <span class="skippy-text">Skip to main content</span>
  26. </a>
  27. <header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
  28. <a class="navbar-brand mr-0 mr-md-2" href="/" aria-label="Bootstrap">
  29. <img src="/favicon.png" width="36" height="36">
  30. </a>
  31. <div class="navbar-nav-scroll">
  32. <ul class="navbar-nav bd-navbar-nav flex-row">
  33. <li class="nav-item">
  34. <a class="nav-link "
  35. href="/">Home</a>
  36. </li>
  37. <li class="nav-item">
  38. <a class="nav-link active"
  39. href="/docs/getting-started/introduction/">
  40. Documentation
  41. </a>
  42. </li>
  43. <li class="nav-item ">
  44. <a class="nav-link" href="/themes">
  45. Themes
  46. </a>
  47. </li>
  48. <li class="nav-item">
  49. <a class="nav-link "
  50. href="https://examples.bootstrap-table.com">
  51. Examples
  52. </a>
  53. </li>
  54. <li class="nav-item">
  55. <a class="nav-link"
  56. href="https://live.bootstrap-table.com"
  57. target="_blank">
  58. Online Editor
  59. </a>
  60. </li>
  61. <li class="nav-item ">
  62. <a class="nav-link" href="/news">
  63. News
  64. </a>
  65. </li>
  66. <li class="nav-item">
  67. <a class="nav-link"
  68. href="https://blog.bootstrap-table.com"
  69. target="_blank">
  70. Blog
  71. </a>
  72. </li>
  73. </ul>
  74. </div>
  75. <ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
  76. <li class="nav-item dropdown">
  77. <a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  78. v1.20.0
  79. </a>
  80. <div class="dropdown-menu dropdown-menu-md-right" aria-labelledby="bd-versions">
  81. <a class="dropdown-item active" href="/">Latest (1.20.0)</a>
  82. <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.19.1/" target="_blank">v1.19.1</a>
  83. <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.18.3/" target="_blank">v1.18.3</a>
  84. <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.17.1/" target="_blank">v1.17.1</a>
  85. <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.16.0/" target="_blank">v1.16.0</a>
  86. <a class="dropdown-item" href="http://bootstrap-table.com/versions/1.15.5/" target="_blank">v1.15.5</a>
  87. </div>
  88. </li>
  89. <li class="nav-item">
  90. <a class="nav-link p-2" href="https://github.com/wenzhixin/bootstrap-table" target="_blank" rel="noopener" aria-label="GitHub"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 499.36" focusable="false" role="img"><path d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z" fill="currentColor" fill-rule="evenodd"/></svg>
  91. </a>
  92. </li>
  93. <li class="nav-item">
  94. <a class="nav-link p-2" href="https://twitter.com/wenzhixin2010" target="_blank" rel="noopener" aria-label="Twitter"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 416.32" focusable="false" role="img"><path d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92" fill="currentColor"/></svg>
  95. </a>
  96. </li>
  97. <li class="nav-item">
  98. <a class="nav-link p-2" href="https://opencollective.com/bootstrap-table" target="_blank" rel="noopener" aria-label="Open Collective"><svg class="navbar-nav-svg" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 40 41" focusable="false" role="img" fill="currentColor" fill-rule="evenodd"><title>Open Collective</title><path d="M32.8 21c0 2.4-.8 4.9-2 6.9l5.1 5.1c2.5-3.4 4.1-7.6 4.1-12 0-4.6-1.6-8.8-4-12.2L30.7 14c1.2 2 2 4.3 2 7z" fill-opacity=".4"/><path d="M20 33.7a12.8 12.8 0 0 1 0-25.6c2.6 0 5 .7 7 2.1L32 5a20 20 0 1 0 .1 31.9l-5-5.2a13 13 0 0 1-7 2z"/></svg>
  99. </a>
  100. </li>
  101. </ul>
  102. <a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3"
  103. href="/docs/getting-started/download/">Download</a>
  104. </header>
  105. <div class="container-fluid">
  106. <div class="row flex-xl-nowrap">
  107. <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
  108. <form class="bd-search d-flex align-items-center">
  109. <input type="search" class="form-control"
  110. id="search-input" placeholder="Search..."
  111. aria-label="Search for..." autocomplete="off">
  112. <button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"
  113. type="button" data-toggle="collapse" data-target="#bd-docs-nav"
  114. aria-controls="bd-docs-nav" aria-expanded="false"
  115. aria-label="Toggle docs navigation"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 30 30" width="30" height="30" focusable="false" role="img"><title>Menu</title><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" d="M4 7h22M4 15h22M4 23h22"/></svg>
  116. </button>
  117. </form>
  118. <nav class="collapse bd-links" id="bd-docs-nav"><div class="bd-toc-item">
  119. <a class="bd-toc-link" href="/docs/getting-started/introduction/">
  120. Getting started
  121. </a>
  122. <ul class="nav bd-sidenav"><li>
  123. <a href="/docs/getting-started/introduction/">
  124. Introduction
  125. </a>
  126. </li><li>
  127. <a href="/docs/getting-started/download/">
  128. Download
  129. </a>
  130. </li><li>
  131. <a href="/docs/getting-started/contents/">
  132. Contents
  133. </a>
  134. </li><li>
  135. <a href="/docs/getting-started/usage/">
  136. Usage
  137. </a>
  138. </li><li>
  139. <a href="/docs/getting-started/browsers-devices/">
  140. Browsers & devices
  141. </a>
  142. </li><li>
  143. <a href="/docs/getting-started/build-tools/">
  144. Build tools
  145. </a>
  146. </li></ul>
  147. </div><div class="bd-toc-item active">
  148. <a class="bd-toc-link" href="/docs/api/table-options/">
  149. API
  150. </a>
  151. <ul class="nav bd-sidenav"><li>
  152. <a href="/docs/api/table-options/">
  153. Table Options
  154. </a>
  155. </li><li>
  156. <a href="/docs/api/column-options/">
  157. Column Options
  158. </a>
  159. </li><li>
  160. <a href="/docs/api/events/">
  161. Events
  162. </a>
  163. </li><li class="active bd-sidenav-active">
  164. <a href="/docs/api/methods/">
  165. Methods
  166. </a>
  167. </li><li>
  168. <a href="/docs/api/localizations/">
  169. Localizations
  170. </a>
  171. </li></ul>
  172. </div><div class="bd-toc-item">
  173. <a class="bd-toc-link" href="/docs/extensions/addrbar/">
  174. Extensions
  175. </a>
  176. <ul class="nav bd-sidenav"><li>
  177. <a href="/docs/extensions/addrbar/">
  178. Addrbar
  179. </a>
  180. </li><li>
  181. <a href="/docs/extensions/auto-refresh/">
  182. Auto Refresh
  183. </a>
  184. </li><li>
  185. <a href="/docs/extensions/cookie/">
  186. Cookie
  187. </a>
  188. </li><li>
  189. <a href="/docs/extensions/copy-rows/">
  190. Copy Rows
  191. </a>
  192. </li><li>
  193. <a href="/docs/extensions/custom-view/">
  194. Custom View
  195. </a>
  196. </li><li>
  197. <a href="/docs/extensions/defer-url/">
  198. Defer URL
  199. </a>
  200. </li><li>
  201. <a href="/docs/extensions/editable/">
  202. Editable
  203. </a>
  204. </li><li>
  205. <a href="/docs/extensions/export/">
  206. Export
  207. </a>
  208. </li><li>
  209. <a href="/docs/extensions/filter-control/">
  210. Filter Control
  211. </a>
  212. </li><li>
  213. <a href="/docs/extensions/fixed-columns/">
  214. Fixed Columns
  215. </a>
  216. </li><li>
  217. <a href="/docs/extensions/group-by-v2/">
  218. Group By v2
  219. </a>
  220. </li><li>
  221. <a href="/docs/extensions/i18n-enhance/">
  222. i18n Enhance
  223. </a>
  224. </li><li>
  225. <a href="/docs/extensions/key-events/">
  226. Key Events
  227. </a>
  228. </li><li>
  229. <a href="/docs/extensions/mobile/">
  230. Mobile
  231. </a>
  232. </li><li>
  233. <a href="/docs/extensions/multiple-sort/">
  234. Multiple Sort
  235. </a>
  236. </li><li>
  237. <a href="/docs/extensions/page-jump-to/">
  238. Page Jump To
  239. </a>
  240. </li><li>
  241. <a href="/docs/extensions/pipeline/">
  242. Pipeline
  243. </a>
  244. </li><li>
  245. <a href="/docs/extensions/print/">
  246. Print
  247. </a>
  248. </li><li>
  249. <a href="/docs/extensions/reorder-columns/">
  250. Reorder Columns
  251. </a>
  252. </li><li>
  253. <a href="/docs/extensions/reorder-rows/">
  254. Reorder Rows
  255. </a>
  256. </li><li>
  257. <a href="/docs/extensions/resizable/">
  258. Resizable
  259. </a>
  260. </li><li>
  261. <a href="/docs/extensions/sticky-header/">
  262. Sticky Header
  263. </a>
  264. </li><li>
  265. <a href="/docs/extensions/toolbar/">
  266. Toolbar
  267. </a>
  268. </li><li>
  269. <a href="/docs/extensions/treegrid/">
  270. Treegrid
  271. </a>
  272. </li></ul>
  273. </div><div class="bd-toc-item">
  274. <a class="bd-toc-link" href="/docs/vuejs/introduction/">
  275. VueJS
  276. </a>
  277. <ul class="nav bd-sidenav"><li>
  278. <a href="/docs/vuejs/introduction/">
  279. Introduction
  280. </a>
  281. </li><li>
  282. <a href="/docs/vuejs/browser/">
  283. Browser
  284. </a>
  285. </li><li>
  286. <a href="/docs/vuejs/webpack/">
  287. Webpack
  288. </a>
  289. </li><li>
  290. <a href="/docs/vuejs/component/">
  291. Component
  292. </a>
  293. </li></ul>
  294. </div><div class="bd-toc-item">
  295. <a class="bd-toc-link" href="/docs/online-editor/">
  296. Online Editor
  297. </a>
  298. <ul class="nav bd-sidenav"></ul>
  299. </div><div class="bd-toc-item">
  300. <a class="bd-toc-link" href="/docs/faq/">
  301. FAQ
  302. </a>
  303. <ul class="nav bd-sidenav"></ul>
  304. </div><div class="bd-toc-item">
  305. <a class="bd-toc-link" href="/docs/about/overview/">
  306. About
  307. </a>
  308. <ul class="nav bd-sidenav"><li>
  309. <a href="/docs/about/overview/">
  310. Overview
  311. </a>
  312. </li><li>
  313. <a href="/docs/about/team/">
  314. Team
  315. </a>
  316. </li><li>
  317. <a href="/docs/about/license/">
  318. License
  319. </a>
  320. </li><li>
  321. <a href="/docs/about/translations/">
  322. Translations
  323. </a>
  324. </li></ul>
  325. </div></nav>
  326. </div>
  327. <div class="d-none d-xl-block col-xl-2 bd-toc">
  328. <ul class="section-nav">
  329. <li class="toc-entry toc-h2"><a href="#append">append</a></li>
  330. <li class="toc-entry toc-h2"><a href="#check">check</a></li>
  331. <li class="toc-entry toc-h2"><a href="#checkall">checkAll</a></li>
  332. <li class="toc-entry toc-h2"><a href="#checkby">checkBy</a></li>
  333. <li class="toc-entry toc-h2"><a href="#checkinvert">checkInvert</a></li>
  334. <li class="toc-entry toc-h2"><a href="#collapseallrows">collapseAllRows</a></li>
  335. <li class="toc-entry toc-h2"><a href="#collapserow">collapseRow</a></li>
  336. <li class="toc-entry toc-h2"><a href="#collapserowbyuniqueid">collapseRowByUniqueId</a></li>
  337. <li class="toc-entry toc-h2"><a href="#destroy">destroy</a></li>
  338. <li class="toc-entry toc-h2"><a href="#expandallrows">expandAllRows</a></li>
  339. <li class="toc-entry toc-h2"><a href="#expandrow">expandRow</a></li>
  340. <li class="toc-entry toc-h2"><a href="#expandrowbyuniqueid">expandRowByUniqueId</a></li>
  341. <li class="toc-entry toc-h2"><a href="#filterby">filterBy</a></li>
  342. <li class="toc-entry toc-h2"><a href="#getdata">getData</a></li>
  343. <li class="toc-entry toc-h2"><a href="#gethiddencolumns">getHiddenColumns</a></li>
  344. <li class="toc-entry toc-h2"><a href="#gethiddenrows">getHiddenRows</a></li>
  345. <li class="toc-entry toc-h2"><a href="#getoptions">getOptions</a></li>
  346. <li class="toc-entry toc-h2"><a href="#getrowbyuniqueid">getRowByUniqueId</a></li>
  347. <li class="toc-entry toc-h2"><a href="#getscrollposition">getScrollPosition</a></li>
  348. <li class="toc-entry toc-h2"><a href="#getselections">getSelections</a></li>
  349. <li class="toc-entry toc-h2"><a href="#getvisiblecolumns">getVisibleColumns</a></li>
  350. <li class="toc-entry toc-h2"><a href="#hideallcolumns">hideAllColumns</a></li>
  351. <li class="toc-entry toc-h2"><a href="#hidecolumn">hideColumn</a></li>
  352. <li class="toc-entry toc-h2"><a href="#hideloading">hideLoading</a></li>
  353. <li class="toc-entry toc-h2"><a href="#hiderow">hideRow</a></li>
  354. <li class="toc-entry toc-h2"><a href="#insertrow">insertRow</a></li>
  355. <li class="toc-entry toc-h2"><a href="#load">load</a></li>
  356. <li class="toc-entry toc-h2"><a href="#mergecells">mergeCells</a></li>
  357. <li class="toc-entry toc-h2"><a href="#nextpage">nextPage</a></li>
  358. <li class="toc-entry toc-h2"><a href="#prepend">prepend</a></li>
  359. <li class="toc-entry toc-h2"><a href="#prevpage">prevPage</a></li>
  360. <li class="toc-entry toc-h2"><a href="#refresh">refresh</a></li>
  361. <li class="toc-entry toc-h2"><a href="#refreshoptions">refreshOptions</a></li>
  362. <li class="toc-entry toc-h2"><a href="#remove">remove</a></li>
  363. <li class="toc-entry toc-h2"><a href="#removeall">removeAll</a></li>
  364. <li class="toc-entry toc-h2"><a href="#removebyuniqueid">removeByUniqueId</a></li>
  365. <li class="toc-entry toc-h2"><a href="#resetsearch">resetSearch</a></li>
  366. <li class="toc-entry toc-h2"><a href="#resetview">resetView</a></li>
  367. <li class="toc-entry toc-h2"><a href="#scrollto">scrollTo</a></li>
  368. <li class="toc-entry toc-h2"><a href="#selectpage">selectPage</a></li>
  369. <li class="toc-entry toc-h2"><a href="#showallcolumns">showAllColumns</a></li>
  370. <li class="toc-entry toc-h2"><a href="#showcolumn">showColumn</a></li>
  371. <li class="toc-entry toc-h2"><a href="#showloading">showLoading</a></li>
  372. <li class="toc-entry toc-h2"><a href="#showrow">showRow</a></li>
  373. <li class="toc-entry toc-h2"><a href="#toggledetailview">toggleDetailView</a></li>
  374. <li class="toc-entry toc-h2"><a href="#togglefullscreen">toggleFullscreen</a></li>
  375. <li class="toc-entry toc-h2"><a href="#togglepagination">togglePagination</a></li>
  376. <li class="toc-entry toc-h2"><a href="#toggleview">toggleView</a></li>
  377. <li class="toc-entry toc-h2"><a href="#uncheck">uncheck</a></li>
  378. <li class="toc-entry toc-h2"><a href="#uncheckall">uncheckAll</a></li>
  379. <li class="toc-entry toc-h2"><a href="#uncheckby">uncheckBy</a></li>
  380. <li class="toc-entry toc-h2"><a href="#updatebyuniqueid">updateByUniqueId</a></li>
  381. <li class="toc-entry toc-h2"><a href="#updatecell">updateCell</a></li>
  382. <li class="toc-entry toc-h2"><a href="#updatecellbyuniqueid">updateCellByUniqueId</a></li>
  383. <li class="toc-entry toc-h2"><a href="#updatecolumntitle">updateColumnTitle</a></li>
  384. <li class="toc-entry toc-h2"><a href="#updateformattext">updateFormatText</a></li>
  385. <li class="toc-entry toc-h2"><a href="#updaterow">updateRow</a></li>
  386. </ul>
  387. </div>
  388. <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content api" role="main">
  389. <div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
  390. <a class="btn btn-sm btn-bd-light mb-2 mb-md-0"
  391. href="https://github.com/wenzhixin/bootstrap-table/blob/develop/site/docs/api/methods.md"
  392. title="View and edit this file on GitHub" target="_blank" rel="noopener">
  393. View on GitHub
  394. </a>
  395. <h1 class="bd-title" id="content">
  396. Methods
  397. </h1>
  398. </div>
  399. <p class="bd-lead">The Methods API of Bootstrap Table.</p>
  400. <div id="gg"></div>
  401. <p>The calling method syntax: <code class="highlighter-rouge">$('#table').bootstrapTable('method', parameter)</code>.</p>
  402. <h2 id="append">append</h2>
  403. <ul>
  404. <li>
  405. <p><strong>Parameter:</strong> <code class="highlighter-rouge">data</code></p>
  406. </li>
  407. <li>
  408. <p><strong>Detail:</strong></p>
  409. <p>Append the <code class="highlighter-rouge">data</code> to the table.</p>
  410. </li>
  411. <li>
  412. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/append.html">Append</a></p>
  413. </li>
  414. </ul>
  415. <h2 id="check">check</h2>
  416. <ul>
  417. <li>
  418. <p><strong>Parameter:</strong> <code class="highlighter-rouge">index</code></p>
  419. </li>
  420. <li>
  421. <p><strong>Detail:</strong></p>
  422. <p>Check a row. The row <code class="highlighter-rouge">index</code> starts with 0.</p>
  423. </li>
  424. <li>
  425. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck.html">Check/Uncheck</a></p>
  426. </li>
  427. </ul>
  428. <h2 id="checkall">checkAll</h2>
  429. <ul>
  430. <li>
  431. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  432. </li>
  433. <li>
  434. <p><strong>Detail:</strong></p>
  435. <p>Check all current page rows.</p>
  436. </li>
  437. <li>
  438. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck-all.html">Check/Uncheck All</a></p>
  439. </li>
  440. </ul>
  441. <h2 id="checkby">checkBy</h2>
  442. <ul>
  443. <li>
  444. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  445. </li>
  446. <li>
  447. <p><strong>Detail:</strong></p>
  448. <p>Check a row by an array of values, the params contain:</p>
  449. <ul>
  450. <li><code class="highlighter-rouge">field</code>: name of the field used to find records.</li>
  451. <li><code class="highlighter-rouge">values</code>: array of values for rows to check.</li>
  452. <li><code class="highlighter-rouge">onlyCurrentPage (default false)</code>: If <code class="highlighter-rouge">true</code>, only the visible dataset will be checked. If pagination is used, the other pages will be ignored.</li>
  453. </ul>
  454. </li>
  455. <li>
  456. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck-by.html">Check/Uncheck By</a></p>
  457. </li>
  458. </ul>
  459. <h2 id="checkinvert">checkInvert</h2>
  460. <ul>
  461. <li>
  462. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  463. </li>
  464. <li>
  465. <p><strong>Detail:</strong></p>
  466. <p>Invert check of current page rows. Triggers <code class="highlighter-rouge">onCheckSome</code> and <code class="highlighter-rouge">onUncheckSome</code> events.</p>
  467. </li>
  468. <li>
  469. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-invert.html">Check Invert</a></p>
  470. </li>
  471. </ul>
  472. <h2 id="collapseallrows">collapseAllRows</h2>
  473. <ul>
  474. <li>
  475. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  476. </li>
  477. <li>
  478. <p><strong>Detail:</strong></p>
  479. <p>Collapse all rows if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  480. </li>
  481. <li>
  482. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html">Expand/Collapse All Rows</a></p>
  483. </li>
  484. </ul>
  485. <h2 id="collapserow">collapseRow</h2>
  486. <ul>
  487. <li>
  488. <p><strong>Parameter:</strong> <code class="highlighter-rouge">index</code></p>
  489. </li>
  490. <li>
  491. <p><strong>Detail:</strong></p>
  492. <p>Collapse the row with the <code class="highlighter-rouge">index</code> passed by parameter if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  493. </li>
  494. <li>
  495. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-row.html">Expand/Collapse Row</a></p>
  496. </li>
  497. </ul>
  498. <h2 id="collapserowbyuniqueid">collapseRowByUniqueId</h2>
  499. <ul>
  500. <li>
  501. <p><strong>Parameter:</strong> <code class="highlighter-rouge">uniqueId</code></p>
  502. </li>
  503. <li>
  504. <p><strong>Detail:</strong></p>
  505. <p>Collapse the row with the <code class="highlighter-rouge">uniqueId</code> passed by parameter if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  506. </li>
  507. <li>
  508. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-row-by-uniqueid.html">Expand/Collapse Row by uniqueId</a></p>
  509. </li>
  510. </ul>
  511. <h2 id="destroy">destroy</h2>
  512. <ul>
  513. <li>
  514. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  515. </li>
  516. <li>
  517. <p><strong>Detail:</strong></p>
  518. <p>Destroy the Bootstrap Table.</p>
  519. </li>
  520. <li>
  521. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/destroy.html">Destroy</a></p>
  522. </li>
  523. </ul>
  524. <h2 id="expandallrows">expandAllRows</h2>
  525. <ul>
  526. <li>
  527. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  528. </li>
  529. <li>
  530. <p><strong>Detail:</strong></p>
  531. <p>Expand all rows if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  532. </li>
  533. <li>
  534. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-all-rows.html">Expand/Collapse All Rows</a></p>
  535. </li>
  536. </ul>
  537. <h2 id="expandrow">expandRow</h2>
  538. <ul>
  539. <li>
  540. <p><strong>Parameter:</strong> <code class="highlighter-rouge">index</code></p>
  541. </li>
  542. <li>
  543. <p><strong>Detail:</strong></p>
  544. <p>Expand the row that has the <code class="highlighter-rouge">index</code> passed by parameter if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  545. </li>
  546. <li>
  547. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-row.html">Expand/Collapse Row</a></p>
  548. </li>
  549. </ul>
  550. <h2 id="expandrowbyuniqueid">expandRowByUniqueId</h2>
  551. <ul>
  552. <li>
  553. <p><strong>Parameter:</strong> <code class="highlighter-rouge">uniqueId</code></p>
  554. </li>
  555. <li>
  556. <p><strong>Detail:</strong></p>
  557. <p>Expand the row with the <code class="highlighter-rouge">uniqueId</code> passed by parameter if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  558. </li>
  559. <li>
  560. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/expand-collapse-row-by-uniqueid.html">Expand/Collapse Row by uniqueId</a></p>
  561. </li>
  562. </ul>
  563. <h2 id="filterby">filterBy</h2>
  564. <ul>
  565. <li><strong>Parameter:</strong>
  566. <ul>
  567. <li><code class="highlighter-rouge">filter - An Object of filter</code>
  568. Default: <code class="highlighter-rouge">{}</code></li>
  569. <li><code class="highlighter-rouge">options - An Object of options</code>
  570. Default:
  571. <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> {
  572. 'filterAlgorithm': 'and'
  573. }
  574. </code></pre></div> </div>
  575. </li>
  576. </ul>
  577. </li>
  578. <li>
  579. <p><strong>Detail:</strong></p>
  580. <p>(Can used only in client-side) Filter data in the table.
  581. There are multiple ways to filter:</p>
  582. <ul>
  583. <li>Leave the options blank to use the <code class="highlighter-rouge">and</code> filter.</li>
  584. <li>Set the <code class="highlighter-rouge">filterAlgorithm</code> (see at parameter) to <code class="highlighter-rouge">or</code> to use the <code class="highlighter-rouge">or</code> filter.</li>
  585. <li>Pass a function to the <code class="highlighter-rouge">filterAlgorithm</code> (see at parameter) to use a <code class="highlighter-rouge">custom</code> filter.</li>
  586. </ul>
  587. <p><strong>Filter Algorithm</strong></p>
  588. <ul>
  589. <li>And
  590. <ul>
  591. <li>Filter <code class="highlighter-rouge">{age: 10}</code> to show the data only age is equal to 10. You can also filter with an array of values, as in: <code class="highlighter-rouge">{age: 10, hairColor: ['blue', 'red', 'green']}</code> to find data where age is equal to 10 and hairColor is either blue, red, or green.</li>
  592. </ul>
  593. </li>
  594. <li>Or
  595. <ul>
  596. <li>Filter <code class="highlighter-rouge">{age: 10, name: "santa"}</code> to show all Data which has a age of 10 <strong>or</strong> the name is equals to santa.</li>
  597. </ul>
  598. </li>
  599. <li>Custom
  600. <ul>
  601. <li>Filter by your Custom algorithm</li>
  602. <li>Function parameters:
  603. <ul>
  604. <li>Row</li>
  605. <li>Filters</li>
  606. </ul>
  607. </li>
  608. <li>Return <code class="highlighter-rouge">true</code> to keep the row and return <code class="highlighter-rouge">false</code> to filter the row.</li>
  609. </ul>
  610. </li>
  611. </ul>
  612. </li>
  613. <li><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/filter-by.html">Filter By</a></li>
  614. </ul>
  615. <h2 id="getdata">getData</h2>
  616. <ul>
  617. <li>
  618. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  619. </li>
  620. <li>
  621. <p><strong>Detail:</strong></p>
  622. <p>Get the loaded data of the table at the moment that this method is called</p>
  623. <ul>
  624. <li><code class="highlighter-rouge">useCurrentPage</code>: if set to true, the method will return the data only on the current page.</li>
  625. <li><code class="highlighter-rouge">includeHiddenRows</code>: if set to true, the method will include the hidden rows.</li>
  626. <li><code class="highlighter-rouge">unfiltered</code>: if set to true, the method will include all data (unfiltered).</li>
  627. <li><code class="highlighter-rouge">formatted</code>: get the formatted value from the defined <a href="https://bootstrap-table.com/docs/api/column-options/#formatter">formatter</a>.</li>
  628. </ul>
  629. </li>
  630. <li>
  631. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-data.html">Get Data</a></p>
  632. </li>
  633. </ul>
  634. <h2 id="gethiddencolumns">getHiddenColumns</h2>
  635. <ul>
  636. <li>
  637. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  638. </li>
  639. <li>
  640. <p><strong>Detail:</strong></p>
  641. <p>Get hidden columns.</p>
  642. </li>
  643. <li>
  644. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html">Get Visible/Hidden Columns</a></p>
  645. </li>
  646. </ul>
  647. <h2 id="gethiddenrows">getHiddenRows</h2>
  648. <ul>
  649. <li>
  650. <p><strong>Parameter:</strong> <code class="highlighter-rouge">show</code></p>
  651. </li>
  652. <li>
  653. <p><strong>Detail:</strong></p>
  654. <p>Get all rows hidden, and if you pass the <code class="highlighter-rouge">show</code> parameter <code class="highlighter-rouge">true</code>, the rows will be shown again. Otherwise, the method only will return the rows hidden.</p>
  655. </li>
  656. <li>
  657. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-hidden-rows.html">Get Hidden Rows</a></p>
  658. </li>
  659. </ul>
  660. <h2 id="getoptions">getOptions</h2>
  661. <ul>
  662. <li>
  663. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  664. </li>
  665. <li>
  666. <p><strong>Detail:</strong></p>
  667. <p>Return the options object.</p>
  668. </li>
  669. <li>
  670. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-options.html">Get Options</a></p>
  671. </li>
  672. </ul>
  673. <h2 id="getrowbyuniqueid">getRowByUniqueId</h2>
  674. <ul>
  675. <li>
  676. <p><strong>Parameter:</strong> <code class="highlighter-rouge">id</code></p>
  677. </li>
  678. <li>
  679. <p><strong>Detail:</strong></p>
  680. <p>Get data from the table, the row that contains the <code class="highlighter-rouge">id</code> passed by parameter.</p>
  681. </li>
  682. <li>
  683. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-row-by-unique-id.html">Get Row By Unique Id</a></p>
  684. </li>
  685. </ul>
  686. <h2 id="getscrollposition">getScrollPosition</h2>
  687. <ul>
  688. <li>
  689. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  690. </li>
  691. <li>
  692. <p><strong>Detail:</strong></p>
  693. <p>Get the current scroll position. The unit is <code class="highlighter-rouge">'px'</code>.</p>
  694. </li>
  695. <li>
  696. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-scroll-position.html">Get Scroll Position</a></p>
  697. </li>
  698. </ul>
  699. <h2 id="getselections">getSelections</h2>
  700. <ul>
  701. <li>
  702. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  703. </li>
  704. <li>
  705. <p><strong>Detail:</strong></p>
  706. <p>Return selected rows. When no record is selected, an empty array will return.
  707. The selected rows will be unselected while some actions, e.g., searching or page change. If you want to maintain the selections, please use <a href="https://bootstrap-table.com/docs/api/table-options/#maintainmetadata">maintainMetaData</a>.</p>
  708. </li>
  709. <li>
  710. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-selections.html">Get Selections</a></p>
  711. </li>
  712. </ul>
  713. <h2 id="getvisiblecolumns">getVisibleColumns</h2>
  714. <ul>
  715. <li>
  716. <p><strong>Parameter:</strong> <code class="highlighter-rouge">-</code></p>
  717. </li>
  718. <li>
  719. <p><strong>Detail:</strong></p>
  720. <p>Get visible columns.</p>
  721. </li>
  722. <li>
  723. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/get-visible-hidden-columns.html">Get Visible/Hidden Columns</a></p>
  724. </li>
  725. </ul>
  726. <h2 id="hideallcolumns">hideAllColumns</h2>
  727. <ul>
  728. <li>
  729. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  730. </li>
  731. <li>
  732. <p><strong>Detail:</strong></p>
  733. <p>Hide All the columns.</p>
  734. </li>
  735. <li>
  736. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html">Show/Hide All Columns</a></p>
  737. </li>
  738. </ul>
  739. <h2 id="hidecolumn">hideColumn</h2>
  740. <ul>
  741. <li>
  742. <p><strong>Parameter:</strong> <code class="highlighter-rouge">field</code></p>
  743. </li>
  744. <li>
  745. <p><strong>Detail:</strong></p>
  746. <p>Hide the specified <code class="highlighter-rouge">field</code> column.
  747. The parameter can be a string or an array of fields.</p>
  748. </li>
  749. <li>
  750. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-column.html">Show/Hide Column</a></p>
  751. </li>
  752. </ul>
  753. <h2 id="hideloading">hideLoading</h2>
  754. <ul>
  755. <li>
  756. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  757. </li>
  758. <li>
  759. <p><strong>Detail:</strong></p>
  760. <p>Hide loading status.</p>
  761. </li>
  762. <li>
  763. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-loading.html">Show/Hide Loading</a></p>
  764. </li>
  765. </ul>
  766. <h2 id="hiderow">hideRow</h2>
  767. <ul>
  768. <li>
  769. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  770. </li>
  771. <li>
  772. <p><strong>Detail:</strong></p>
  773. <p>Hide the specified row. The params must contain at least one of the following properties:</p>
  774. <ul>
  775. <li><code class="highlighter-rouge">index</code>: the row index.</li>
  776. <li><code class="highlighter-rouge">uniqueId</code>: the value of the uniqueId for that row.</li>
  777. </ul>
  778. </li>
  779. <li>
  780. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-row.html">Show/Hide Row</a></p>
  781. </li>
  782. </ul>
  783. <h2 id="insertrow">insertRow</h2>
  784. <ul>
  785. <li>
  786. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  787. </li>
  788. <li>
  789. <p><strong>Detail:</strong></p>
  790. <p>Insert a new row. The params contain the following properties:</p>
  791. <ul>
  792. <li><code class="highlighter-rouge">index</code>: the row index to insert into.</li>
  793. <li><code class="highlighter-rouge">row</code>: the row data.</li>
  794. </ul>
  795. </li>
  796. <li>
  797. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/insert-row.html">Insert Row</a></p>
  798. </li>
  799. </ul>
  800. <h2 id="load">load</h2>
  801. <ul>
  802. <li>
  803. <p><strong>Parameter:</strong> <code class="highlighter-rouge">data</code></p>
  804. </li>
  805. <li>
  806. <p><strong>Detail:</strong></p>
  807. <p>Load the <code class="highlighter-rouge">data</code> to the table. The old rows will be removed.</p>
  808. </li>
  809. <li>
  810. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/load.html">Load</a></p>
  811. </li>
  812. </ul>
  813. <h2 id="mergecells">mergeCells</h2>
  814. <ul>
  815. <li>
  816. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  817. </li>
  818. <li>
  819. <p><strong>Detail:</strong></p>
  820. <p>Merge some cells into one cell. The params contain the following properties:</p>
  821. <ul>
  822. <li><code class="highlighter-rouge">index</code>: the row index.</li>
  823. <li><code class="highlighter-rouge">field</code>: the field name.</li>
  824. <li><code class="highlighter-rouge">rowspan</code>: the rowspan count to be merged.</li>
  825. <li><code class="highlighter-rouge">colspan</code>: the colspan count to be merged.</li>
  826. </ul>
  827. </li>
  828. <li>
  829. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/merge-cells.html">Merge Cells</a></p>
  830. </li>
  831. </ul>
  832. <h2 id="nextpage">nextPage</h2>
  833. <ul>
  834. <li>
  835. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  836. </li>
  837. <li>
  838. <p><strong>Detail:</strong></p>
  839. <p>Go to the next page.</p>
  840. </li>
  841. <li>
  842. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/select-prev-next-page.html">Select/Prev/Next Page</a></p>
  843. </li>
  844. </ul>
  845. <h2 id="prepend">prepend</h2>
  846. <ul>
  847. <li>
  848. <p><strong>Parameter:</strong> <code class="highlighter-rouge">data</code></p>
  849. </li>
  850. <li>
  851. <p><strong>Detail:</strong></p>
  852. <p>Prepend the <code class="highlighter-rouge">data</code> to the table.</p>
  853. </li>
  854. <li>
  855. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/prepend.html">Prepend</a></p>
  856. </li>
  857. </ul>
  858. <h2 id="prevpage">prevPage</h2>
  859. <ul>
  860. <li>
  861. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  862. </li>
  863. <li>
  864. <p><strong>Detail:</strong></p>
  865. <p>Go to the previous page.</p>
  866. </li>
  867. <li>
  868. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/select-prev-next-page.html">Select/Prev/Next Page</a></p>
  869. </li>
  870. </ul>
  871. <h2 id="refresh">refresh</h2>
  872. <ul>
  873. <li>
  874. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  875. </li>
  876. <li>
  877. <p><strong>Detail:</strong></p>
  878. <p>Refresh/reload the remote server data, you can set <code class="highlighter-rouge">{silent: true}</code> to refresh the data silently, and set <code class="highlighter-rouge">{url: newUrl, pageNumber: pageNumber, pageSize: pageSize}</code> to change the url (optional), page number (optional) and page size (optional). To supply query params specific to this request, set <code class="highlighter-rouge">{query: {foo: 'bar'}}</code>.</p>
  879. </li>
  880. <li>
  881. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/refresh.html">Refresh</a></p>
  882. </li>
  883. </ul>
  884. <h2 id="refreshoptions">refreshOptions</h2>
  885. <ul>
  886. <li>
  887. <p><strong>Parameter:</strong> <code class="highlighter-rouge">options</code></p>
  888. </li>
  889. <li>
  890. <p><strong>Detail:</strong></p>
  891. <p>Refresh the table <code class="highlighter-rouge">options</code>.</p>
  892. </li>
  893. <li>
  894. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/refresh-options.html">Refresh Options</a></p>
  895. </li>
  896. </ul>
  897. <h2 id="remove">remove</h2>
  898. <ul>
  899. <li>
  900. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  901. </li>
  902. <li>
  903. <p><strong>Detail:</strong></p>
  904. <p>Remove data from the table. The params contain two properties:</p>
  905. <ul>
  906. <li><code class="highlighter-rouge">field</code>: the field name of remove rows. If <code class="highlighter-rouge">$index</code> is not in your fields, you can use this special field <code class="highlighter-rouge">$index</code> to remove rows by row index.</li>
  907. <li><code class="highlighter-rouge">values</code>: the array of values for rows that should be removed. If you use the special field <code class="highlighter-rouge">$index</code>, you can pass an array of indexes.</li>
  908. </ul>
  909. </li>
  910. <li>
  911. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/remove.html">Remove</a></p>
  912. </li>
  913. </ul>
  914. <h2 id="removeall">removeAll</h2>
  915. <ul>
  916. <li>
  917. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  918. </li>
  919. <li>
  920. <p><strong>Detail:</strong></p>
  921. <p>Remove all data from the table.</p>
  922. </li>
  923. <li>
  924. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/remove-all.html">Remove All</a></p>
  925. </li>
  926. </ul>
  927. <h2 id="removebyuniqueid">removeByUniqueId</h2>
  928. <ul>
  929. <li>
  930. <p><strong>Parameter:</strong> <code class="highlighter-rouge">id</code></p>
  931. </li>
  932. <li>
  933. <p><strong>Detail:</strong></p>
  934. <p>Remove data from the table, the row that contains the <code class="highlighter-rouge">id</code> passed by parameter.</p>
  935. </li>
  936. <li>
  937. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/remove-by-unique-id.html">Remove By Unique Id</a></p>
  938. </li>
  939. </ul>
  940. <h2 id="resetsearch">resetSearch</h2>
  941. <ul>
  942. <li>
  943. <p><strong>Parameter:</strong> <code class="highlighter-rouge">text</code></p>
  944. </li>
  945. <li>
  946. <p><strong>Detail:</strong></p>
  947. <p>Set the search <code class="highlighter-rouge">text</code>.</p>
  948. </li>
  949. <li>
  950. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/reset-search.html">Reset Search</a></p>
  951. </li>
  952. </ul>
  953. <h2 id="resetview">resetView</h2>
  954. <ul>
  955. <li>
  956. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  957. </li>
  958. <li>
  959. <p><strong>Detail:</strong></p>
  960. <p>Reset the Bootstrap Table view. For example, reset the table height, the params contain:</p>
  961. <ul>
  962. <li><code class="highlighter-rouge">height</code>: the height of the table.</li>
  963. </ul>
  964. </li>
  965. <li>
  966. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/reset-view.html">Reset View</a></p>
  967. </li>
  968. </ul>
  969. <h2 id="scrollto">scrollTo</h2>
  970. <ul>
  971. <li>
  972. <p><strong>Parameter:</strong> <code class="highlighter-rouge">value|object</code></p>
  973. </li>
  974. <li>
  975. <p><strong>Detail:</strong></p>
  976. <ul>
  977. <li>value
  978. <ul>
  979. <li>Scroll to the number <code class="highlighter-rouge">value</code> position, the unit is <code class="highlighter-rouge">'px'</code>, set <code class="highlighter-rouge">'bottom'</code> means scroll to the bottom.</li>
  980. </ul>
  981. </li>
  982. <li>object
  983. <ul>
  984. <li>Scroll to the unit (<code class="highlighter-rouge">px</code> or <code class="highlighter-rouge">rows (index starts by 0)</code>)
  985. Default: <code class="highlighter-rouge">{unit: 'px', value: 0}</code></li>
  986. </ul>
  987. </li>
  988. </ul>
  989. </li>
  990. <li>
  991. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/scroll-to.html">Scroll To</a></p>
  992. </li>
  993. </ul>
  994. <h2 id="selectpage">selectPage</h2>
  995. <ul>
  996. <li>
  997. <p><strong>Parameter:</strong> <code class="highlighter-rouge">page</code></p>
  998. </li>
  999. <li>
  1000. <p><strong>Detail:</strong></p>
  1001. <p>Go to the specified <code class="highlighter-rouge">page</code>.</p>
  1002. </li>
  1003. <li>
  1004. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/select-prev-next-page.html">Select/Prev/Next Page</a></p>
  1005. </li>
  1006. </ul>
  1007. <h2 id="showallcolumns">showAllColumns</h2>
  1008. <ul>
  1009. <li>
  1010. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1011. </li>
  1012. <li>
  1013. <p><strong>Detail:</strong></p>
  1014. <p>Show All the columns.</p>
  1015. </li>
  1016. <li>
  1017. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-all-columns.html">Show/Hide All Columns</a></p>
  1018. </li>
  1019. </ul>
  1020. <h2 id="showcolumn">showColumn</h2>
  1021. <ul>
  1022. <li>
  1023. <p><strong>Parameter:</strong> <code class="highlighter-rouge">field</code></p>
  1024. </li>
  1025. <li>
  1026. <p><strong>Detail:</strong></p>
  1027. <p>Show the specified <code class="highlighter-rouge">field</code> column.
  1028. The parameter can be a string or an array of fields.</p>
  1029. </li>
  1030. <li>
  1031. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-column.html">Show/Hide Column</a></p>
  1032. </li>
  1033. </ul>
  1034. <h2 id="showloading">showLoading</h2>
  1035. <ul>
  1036. <li>
  1037. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1038. </li>
  1039. <li>
  1040. <p><strong>Detail:</strong></p>
  1041. <p>Show loading status.</p>
  1042. </li>
  1043. <li>
  1044. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-loading.html">Show/Hide Loading</a></p>
  1045. </li>
  1046. </ul>
  1047. <h2 id="showrow">showRow</h2>
  1048. <ul>
  1049. <li>
  1050. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1051. </li>
  1052. <li>
  1053. <p><strong>Detail:</strong></p>
  1054. <p>Show the specified row. The params must contain at least one of the following properties:</p>
  1055. <ul>
  1056. <li><code class="highlighter-rouge">index</code>: the row index.</li>
  1057. <li><code class="highlighter-rouge">uniqueId</code>: the value of the uniqueId for that row.</li>
  1058. </ul>
  1059. </li>
  1060. <li>
  1061. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/show-hide-row.html">Show/Hide Row</a></p>
  1062. </li>
  1063. </ul>
  1064. <h2 id="toggledetailview">toggleDetailView</h2>
  1065. <ul>
  1066. <li>
  1067. <p><strong>Parameter:</strong> <code class="highlighter-rouge">index</code></p>
  1068. </li>
  1069. <li>
  1070. <p><strong>Detail:</strong></p>
  1071. <p>Toggle the row that has the <code class="highlighter-rouge">index</code> passed by parameter if the detail view option is set to <code class="highlighter-rouge">true</code>.</p>
  1072. </li>
  1073. <li>
  1074. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/toggle-detail-view.html">Toggle Detail View</a></p>
  1075. </li>
  1076. </ul>
  1077. <h2 id="togglefullscreen">toggleFullscreen</h2>
  1078. <ul>
  1079. <li>
  1080. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1081. </li>
  1082. <li>
  1083. <p><strong>Detail:</strong></p>
  1084. <p>Toggle fullscreen.</p>
  1085. </li>
  1086. <li>
  1087. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/toggle-fullscreen.html">Toggle Fullscreen</a></p>
  1088. </li>
  1089. </ul>
  1090. <h2 id="togglepagination">togglePagination</h2>
  1091. <ul>
  1092. <li>
  1093. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1094. </li>
  1095. <li>
  1096. <p><strong>Detail:</strong></p>
  1097. <p>Toggle the pagination option.</p>
  1098. </li>
  1099. <li>
  1100. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/toggle-pagination.html">Toggle Pagination</a></p>
  1101. </li>
  1102. </ul>
  1103. <h2 id="toggleview">toggleView</h2>
  1104. <ul>
  1105. <li>
  1106. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1107. </li>
  1108. <li>
  1109. <p><strong>Detail:</strong></p>
  1110. <p>Toggle the card/table view.</p>
  1111. </li>
  1112. <li>
  1113. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/toggle-view.html">Toggle View</a></p>
  1114. </li>
  1115. </ul>
  1116. <h2 id="uncheck">uncheck</h2>
  1117. <ul>
  1118. <li>
  1119. <p><strong>Parameter:</strong> <code class="highlighter-rouge">index</code></p>
  1120. </li>
  1121. <li>
  1122. <p><strong>Detail:</strong></p>
  1123. <p>Uncheck a row. The row <code class="highlighter-rouge">index</code> starts with 0.</p>
  1124. </li>
  1125. <li>
  1126. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck.html">Check/Uncheck</a></p>
  1127. </li>
  1128. </ul>
  1129. <h2 id="uncheckall">uncheckAll</h2>
  1130. <ul>
  1131. <li>
  1132. <p><strong>Parameter:</strong> <code class="highlighter-rouge">undefined</code></p>
  1133. </li>
  1134. <li>
  1135. <p><strong>Detail:</strong></p>
  1136. <p>Uncheck all current page rows.</p>
  1137. </li>
  1138. <li>
  1139. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck-all.html">Check/Uncheck All</a></p>
  1140. </li>
  1141. </ul>
  1142. <h2 id="uncheckby">uncheckBy</h2>
  1143. <ul>
  1144. <li>
  1145. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1146. </li>
  1147. <li>
  1148. <p><strong>Detail:</strong></p>
  1149. <p>Uncheck a row by an array of values. The params contain:</p>
  1150. <ul>
  1151. <li><code class="highlighter-rouge">field</code>: name of the field used to find records.</li>
  1152. <li><code class="highlighter-rouge">values</code>: array of values for rows to uncheck.</li>
  1153. <li><code class="highlighter-rouge">onlyCurrentPage (default false)</code>: If <code class="highlighter-rouge">true</code>, only the visible dataset will be unchecked. If pagination is used, the other pages will be ignored.</li>
  1154. </ul>
  1155. </li>
  1156. <li>
  1157. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/check-uncheck-by.html">Check/Uncheck By</a></p>
  1158. </li>
  1159. </ul>
  1160. <h2 id="updatebyuniqueid">updateByUniqueId</h2>
  1161. <ul>
  1162. <li>
  1163. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1164. </li>
  1165. <li>
  1166. <p><strong>Detail:</strong></p>
  1167. <p>Update the specified row(s). Each param contains the following properties:</p>
  1168. <ul>
  1169. <li><code class="highlighter-rouge">id</code>: a row id where the id should be the <code class="highlighter-rouge">uniqueId</code> field assigned to the table.</li>
  1170. <li><code class="highlighter-rouge">row</code>: the new row data.</li>
  1171. <li><code class="highlighter-rouge">replace</code> (optional): set to <code class="highlighter-rouge">true</code> to replace the row instead of extending.</li>
  1172. </ul>
  1173. </li>
  1174. <li>
  1175. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-by-unique-id.html">Update By Unique Id</a></p>
  1176. </li>
  1177. </ul>
  1178. <h2 id="updatecell">updateCell</h2>
  1179. <ul>
  1180. <li>
  1181. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1182. </li>
  1183. <li>
  1184. <p><strong>Detail:</strong></p>
  1185. <p>Update one cell. The params contain the following properties:</p>
  1186. <ul>
  1187. <li><code class="highlighter-rouge">index</code>: the row index.</li>
  1188. <li><code class="highlighter-rouge">field</code>: the field name.</li>
  1189. <li><code class="highlighter-rouge">value</code>: the new field value.</li>
  1190. </ul>
  1191. <p>To disable table re-initialization, you can set <code class="highlighter-rouge">{reinit: false}</code>.</p>
  1192. </li>
  1193. <li>
  1194. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-cell.html">Update Cell</a></p>
  1195. </li>
  1196. </ul>
  1197. <h2 id="updatecellbyuniqueid">updateCellByUniqueId</h2>
  1198. <ul>
  1199. <li>
  1200. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1201. </li>
  1202. <li>
  1203. <p><strong>Detail:</strong></p>
  1204. <p>Update the specified cell(s). Each param contains the following properties:</p>
  1205. <ul>
  1206. <li><code class="highlighter-rouge">id</code>: row id where the id should be the <code class="highlighter-rouge">uniqueId</code> field assigned to the table.</li>
  1207. <li><code class="highlighter-rouge">field</code>: field name of the cell to be updated.</li>
  1208. <li><code class="highlighter-rouge">value</code>: the new value of the cell.</li>
  1209. </ul>
  1210. </li>
  1211. <li>
  1212. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-cell-by-unique-id.html">Update Cell By Unique Id</a></p>
  1213. </li>
  1214. </ul>
  1215. <h2 id="updatecolumntitle">updateColumnTitle</h2>
  1216. <ul>
  1217. <li>
  1218. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1219. </li>
  1220. <li>
  1221. <p><strong>Detail:</strong></p>
  1222. <p>Update the field title of the column. The params contain the following properties:</p>
  1223. <ul>
  1224. <li><code class="highlighter-rouge">field</code>: the field name.</li>
  1225. <li><code class="highlighter-rouge">title</code>: the field title.</li>
  1226. </ul>
  1227. </li>
  1228. <li>
  1229. <p><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-column-title.html">Update Column Title</a></p>
  1230. </li>
  1231. </ul>
  1232. <h2 id="updateformattext">updateFormatText</h2>
  1233. <ul>
  1234. <li>
  1235. <p><strong>Parameter:</strong> <code class="highlighter-rouge">formatName, text</code></p>
  1236. </li>
  1237. <li>
  1238. <p><strong>Detail:</strong></p>
  1239. <p>Update the localizations format text.</p>
  1240. </li>
  1241. <li><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-format-text.html">Update Format Text</a>
  1242. <h2 id="updaterow">updateRow</h2>
  1243. </li>
  1244. <li>
  1245. <p><strong>Parameter:</strong> <code class="highlighter-rouge">params</code></p>
  1246. </li>
  1247. <li>
  1248. <p><strong>Detail:</strong></p>
  1249. <p>Update the specified row(s). Each param contains the following properties:</p>
  1250. <ul>
  1251. <li><code class="highlighter-rouge">index</code>: the row index to be updated.</li>
  1252. <li><code class="highlighter-rouge">row</code>: the new row data.</li>
  1253. <li><code class="highlighter-rouge">replace</code> (optional): set to <code class="highlighter-rouge">true</code> to replace the row instead of extending.</li>
  1254. </ul>
  1255. </li>
  1256. <li><strong>Example:</strong> <a href="https://examples.bootstrap-table.com/#methods/update-row.html">Update Row</a></li>
  1257. </ul>
  1258. </main>
  1259. </div>
  1260. </div>
  1261. <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
  1262. <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
  1263. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  1264. <script async defer src="https://buttons.github.io/buttons.js"></script><script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
  1265. <script>
  1266. $(function () {
  1267. $('.bd-content.api a').attr('target', '_blank')
  1268. })
  1269. </script><script src="https://gg.wenzhixin.net.cn/bootstrap-table/gg.js"></script>
  1270. <script src="/assets/js/docs.min.js?m=1"></script>
  1271. <!-- Global site tag (gtag.js) - Google Analytics -->
  1272. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-132747866-1"></script>
  1273. <script>
  1274. window.dataLayer = window.dataLayer || []
  1275. function gtag() {window.dataLayer.push(arguments)}
  1276. gtag('js', new Date())
  1277. gtag('config', 'UA-132747866-1')
  1278. </script>
  1279. </body>
  1280. </html>