index.html 50 KB

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