


How to use new conditional query and refresh parameter in toolbar in Bootstrap table
This article mainly introduces the new condition query and refresh parameter usage of toolbar in Bootstrap table. It is very good and has certain reference value. Friends who need it can refer to it.
Recommended tutorial: Bootstrap graphic tutorial
## How do we want to customize the query conditions in bootstrap-table What about implementation? Where are these custom buttons and input boxes defined?//工具按钮用哪个容器 toolbar: '#toolbar', <div id="toolbar"></div>The query conditions we defined are put into this div. Let’s first look at the effect we expect:
<div class="container"> <div class="row"> <div class="table-responsive"> <div id="toolbar"> <form class="form-inline"> <div class="form-group"> <label class="sr-only" for="product_line">产品线</label> <div class="input-group"> <div class="input-group-addon">产品线</div> <select class="form-control" name="product_line" id="productLine"> <option value="">请选择产品线...</option> </select> </div> </div> <div class="form-group"> <label class="sr-only" for="msg_type">消息类型</label> <div class="input-group"> <div class="input-group-addon">消息类型</div> <select class="form-control" name="msg_type" id="msgType"> <option value="">请选择消息类型...</option> </select> </div> </div> <div class="form-group"> <label class="sr-only" for="msg_type">消息类型</label> <div class="input-group"> <div class="input-group-addon">消息类型</div> <input type="text" class="form-control" name="searchTexts" id="searchText" placeholder="请输入消息名称或内容关键字..."> </div> </div> <button type="button" class="btn btn-primary queryButton">查询</button> </form> </div> <table id="table" ></table> </div> </div> </div>Get the corresponding value from the parameters passed in the request server:
//请求服务器数据 queryParams: function queryParams(params){ var param = { pageNumber: params.pageNumber, pageSize: params.pageSize, sortName: params.sortName, sortOrder: params.sortOrder, searchText: $("#searchText").val(), msgType: $("#msgType").val(), productLine: $("#productLine").val() }; return param; }Finally, submit it to the server:
//查询 $(document).on('click', ".queryButton",function(){ $('#table').bootstrapTable('refresh'); });This The refresh official document describes it like this:
{silent: true} to refresh the data silently, and set
{url: newUrl }Change URL.
{query: {foo: 'bar'}}.
Summary
The above is the editor’s introduction to the use of new condition queries and refresh parameters for toolbar in Bootstrap table Method, I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time.The above is the detailed content of How to use new conditional query and refresh parameter in toolbar in Bootstrap table. For more information, please follow other related articles on the PHP Chinese website!

Bootstrap'sgridsystemiseffectiveduetoits12-columnlayoutandresponsiveclasses,allowingforflexibleandmaintainabledesigns.Toleverageit:1)Userowsandcolumnswithclasseslikecol-md,col-sm,andcol-lgfordifferentscreensizes.2)Simplifylayoutsbyavoidingexcessivene

BootstrapGridSystemisessentialforcreatingresponsivelayouts.1)Itusescontainers,rows,andcolumnsbasedona12-columnlayout.2)CSSflexboxandmediaqueriesensureflexibilityacrossscreensizes.3)Classeslikecol-xs,col-sm,col-md,andcol-lgcontrollayoutchanges.4)Avoid

Bootstrap is a front-end framework for quickly building responsive websites. Its advantages include: 1. Rapid development: leverage predefined styles and components. 2. Consistency: Provide a unified design style. 3. Responsive design: The built-in grid system is adapted to various devices. Bootstrap simplifies the web development process through CSS classes and JavaScript plug-ins.

Bootstrap simplifies the development process mainly through its raster system, predefined components and JavaScript plug-ins. 1. The grid system allows for flexible layout, 2. Predefined components such as buttons and navigation bars simplify style design, 3. JavaScript plug-in enhances interactive functions and improves development efficiency.

Bootstrap is an open source front-end framework developed by Twitter, providing rich CSS and JavaScript components, simplifying the construction of responsive websites. 1) Its grid system is based on a 12-column layout, and the display of elements under different screen sizes is controlled through class names. 2) The component library includes buttons, navigation bars, etc., which are easy to customize and use. 3) The working principle depends on CSS and JavaScript files, and you need to pay attention to handling dependencies and style conflicts. 4) The usage examples show basic and advanced usage, emphasizing the importance of custom functionality. 5) Common errors include grid system calculation errors and style coverage, which require debugging using developer tools. 6) Performance optimization recommendations only introduce necessary components and customize samples using preprocessors

Bootstrap is an open source front-end framework developed by the Twitter team to simplify and speed up the web development process. 1.Bootstrap is based on HTML, CSS and JavaScript, and provides a wealth of components and tools for creating modern user interfaces. 2. Its core lies in responsive design, implementing various layouts and styles through predefined classes and components. 3.Bootstrap provides predefined UI components, such as navigation bars, buttons, forms, etc., which are easy to use and adjust. 4. Examples of usage include creating a simple navigation bar and advanced collapsible sidebar. 5. Common errors include version conflicts, CSS overwrites and JavaScript errors, which can be used through the version management tool.

Bootstrap can be integrated in React in two ways: 1) CSS and JavaScript files using Bootstrap; 2) Use the React-Bootstrap library. React-Bootstrap provides encapsulated React components, making using Bootstrap in React more natural and efficient.

There are two ways to use Bootstrap components in React projects: 1) CSS and JavaScript of the original Bootstrap; 2) Use libraries designed specifically for React such as react-bootstrap or reactstrap. 1) Install Bootstrap through npm and introduce its CSS file in the entry file, and then use the Bootstrap class name in the React component. 2) After installing react-bootstrap or reactstrap, directly use the React components it provides. Use these methods to quickly build a responsive UI, but pay attention to style loading and JavaScript


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
