index.html 50 KB

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