index.html 49 KB

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