index.html 51 KB

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