Git Product home page Git Product logo

wenzhixin / bootstrap-table Goto Github PK

View Code? Open in Web Editor NEW
11.7K 481.0 4.4K 36.12 MB

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)

Home Page: https://bootstrap-table.com/

License: MIT License

JavaScript 57.98% HTML 17.30% Ruby 0.22% CSS 1.82% Vue 14.93% SCSS 7.75%
bootstrap table pagination checkbox radio datatables css css-framework semantic-ui bulma

bootstrap-table's Introduction

Build Status GitHub version Donate Backers on Open Collective Sponsors on Open Collective Package Quality

An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.

To get started, check out:

List of donators

LICENSE

NOTE: Bootstrap Table is licensed under The MIT License. Completely free, you can arbitrarily use and modify this plugin. If this plugin is useful to you, you can Star this repo, your support is my biggest motive force, thanks.

Features

  • Created for Twitter Bootstrap (All versions supported)
  • Responsive web design
  • Scrollable Table with fixed headers
  • Fully configurable
  • Via data attributes
  • Show/Hide columns
  • Show/Hide headers
  • Show/Hide footers
  • Get data in JSON format using AJAX
  • Simple column sorting with a click
  • Format column
  • Single or multiple row selection
  • Powerful pagination
  • Card view
  • Detail view
  • Localization
  • Extensions

How to get it

Manual download

Use Releases page or the source.

Yarn

yarn add bootstrap-table

Npm

npm install bootstrap-table

CDN

You can source bootstrap-table directly from a CDN like CDNJS or bootcss or jsdelivr.

Contributing

For feature requests, bug reports or submitting pull requests, please ensure you first read CONTRIBUTING.md.

Reporting Issues

As stated above, please read CONTRIBUTING.md, especially Bug Reports

And as stated there, please provide an Online Example when creating issues!

It's really saves much time.

You can also use our examples template via Load Examples button:

Online Editor

Your feedback is very appreciated!

Acknowledgements

Thanks to everyone who have given feedback and submitted pull requests. A list of all the contributors can be found here. This project exists thanks to all the people who contribute. [Contribute].

Release History

Look at the Change Log

Local develop

To develop bootstrap-table locally please run:

mkdir bootstrap-table-dev
cd bootstrap-table-dev
git clone https://github.com/wenzhixin/bootstrap-table
git clone https://github.com/wenzhixin/bootstrap-table-examples

yarn add http-server
npx http-server

And then open: http://localhost:8081/bootstrap-table-examples

Local build

Be sure to use a current version of yarn/npm. To build bootstrap-table locally please run:

Yarn

yarn install
yarn build

Npm

npm install
npm run build

Result will appear in dist directory.

PayPal Sponsors

Write my essay services from Edubirdie

OpenCollective Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

OpenCollective Backers

Support this project by becoming a backer. Your image will show up here with a link to your website. [Become a backer]

bootstrap-table's People

Contributors

codehag avatar d0d0 avatar dabros avatar dbkaplun avatar dependabot-preview[bot] avatar dependabot[bot] avatar dimbslmh avatar djhvscf avatar fish-fly avatar hopglascock avatar jbarrineau06 avatar juliyvchirkov avatar macias3 avatar manukieli avatar marceloverdijk avatar moutard3 avatar murphmar avatar naruto-kyun avatar nwalters512 avatar rakucmr avatar tannermccoleman avatar thornomad avatar tmorehouse avatar u01jmg3 avatar utechtdustin avatar utilmind avatar vrenaudineau avatar wenzhixin avatar yonjah avatar ywu999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-table's Issues

Data formatter

Hello,

The "data-formatter" has a bug. If i have "data-formatter" in one column, no matter what, and i change the visible columns in the "data-show-columns" menu, some columns changes the format with the "data-formatter" even without the "data-formatter" property.

Response Handler

Dear Wenzhixin,

Would you like to explain in detail the response handler function, if you could do this with ASP.Net MVC, this will be a plus.

Regards,

Table data is duplicated (behind the table header)

First of all, thank you so much for this wonderful plugin! Almost everything I wanted my "tables" to show / look, is possible with just one plugin.

I'm seeing one behavior that might be a bit annoying for a user. The entire table data is duplicated behind the table header. I'm sorry, I'm not able to figure out the right words to explain what I'm trying to convey. So, let's use examples.

Head over to http://wenzhixin.net.cn/p/bootstrap-table/docs/documentation.html - now use the browser search option (typically ctrl+f) and search for "mergeCells". You'll start seeing 2 results:

  • one in the table header
  • one in the table data

Can this be avoided / fixed? I would (at least) expect the table header to be static and not scroll.

Column width

Hello,

The column width is being processed by the body content but if the header is smaller, it cuts and puts ... at the end. I know that there is a "data-width" property but the automatic process could do the job.

Example: I have a column named "Identification" and the content is "1, 2, 3, 4", the header is "I...".

json format

Very nice that one can specify the json file. However, what if the format is not just an array of objects? Is this supported? For example:

{
"docs": [
{"Movie_name": "Goodfellas","Movie_year": 1990},
{"Movie_name": "Meet the Fockers","Movie_year": 2004},
{"Movie_name": "Shark Tale","Movie_year": 2004},
{"Movie_name": "Raging Bull","Movie_year": 1980},
{"Movie_name": "Untouchables, The","Movie_year": 1987},
{"Movie_name": "Godfather: Part II, The","Movie_year": 1974},
{"Movie_name": "Meet the Parents","Movie_year": 2000},
{"Movie_name": "Deer Hunter, The", "Movie_year": 1978}
]
}

Add operation with html5's pushState

please add pagination, sort, search and other operation with html5's pushState and update the browser's URL and browser's back- and forward-buttons for SEO optimazation

Search reference row Bug

The rows at table after search refers to wrong rows position when at “click-row.bs.table” events.
I meant, If I have the A, B, C and D data, when I Search for “B” it will show as if it was row “A” on “click-row.bs.table” events.
Any idea how to fix it?

passing jSon object data to data-Url attribute using $.ajax

I want to pass data to the bootstrap table using jquery, in the example docs it is given as
$('#table').bootstrapTable({
url: 'data.json'
});
,
But I'll call my service and get json object. how can i pass the json Object to the data-Url.

Add search box and refresh method

thank you for share this project. please add search box for search on columns with data-search on column option and server side search. and refresh method that can refresh table client side so if add refresh button is very good.

Disable column / HTML in header

Hello,

I need to disable a column from "data-show-columns=true", like the last column.

If i put HTML in header it hides when it renders the table.

bootstrap table checkbox single select

When I use the bootstrap tabl, I want to achieve the effect of bootstrap table checkbox radio, although radiio radio can achieve the effect, but no later rdio select a record there is no way to cancel selected for this record

bootstrap-table connection to mysql with php

Hi Bro,

I need your help, first tanks for your contribution is excelent. second i want show my data from mysql to your table with php, how can i do it? and i want fixed the first column, can you explain me how do that? thanks...

LeonardoF5
From: Colombia

Bootstrap table styling not applying

All of my attempts at using Bootstrap Table formatting classes have been ignored in all 3 major browsers. Is this intended behavior or have I erred? If it is working as intended, can this be....fixed or made optional, somehow? Part of why I switched to this plugin from a pure-jQuery plugin was because I believed I could apply standard Bootstrap 3 table classes,

<div class="table-responsive">
        <table data-toggle="table" data-sort-name="EM_ID" data-method="get" data-pagination="true" data-url=<cfoutput>"API call with JSON return"</cfoutput> data-undefined-text="---" data-striped="true" data-search="true" data-classes="table table-primary table-striped table-hover table-bordered table-condensed" class="table table-primary table-striped table-hover table-bordered table-condensed" id="panelistReportTable">
</div>

Integers go into table, but aren't searchable.

Not sure if this is intended functionality, but I thought it worth mentioning that when I put some (javascript generated) integers into the table, they weren't searchable.

After some thought, I figured I'd convert them to strings, and they were then searchable.

This plugin is amazing, and I appreciate it!

new event: onDblClickRow

dbl click event would be great, also, I would like to highlight the row when clicked, but onClickRow does not has the element as parameters. is it possible to send both row data and row element.

remote sort

文档上写的排序都是LOCAL SORT,能像分页一样增加server sort吗?

custom search and pagination element

Lets say i want the searchValue to be selected from my own inputfield. So bootstrap-table can be implemented more easily.Same goes for pagination, I want to specify the parent container where the pagination should appear.

Search improvent

When you have a table with server side processing, the search field becomes massive while pressing keys.

Each key you press sends a request to server to "update" the data. You can press keys like arrow left/right, home, end, etc, this keys has no affect to the search value but they currently fires a request.

I suggest to add two behaviors:

  • when typing, set a timeout to fire the update (example: if after 300ms user stop pressing keys, then fire the update request)
  • request to server only if the text has changed

td Click Event

Dear Wenzhixin,

Would you like to guide as currently I am using xditable.js plugin for inline editing, but I have facing the issue as I have not found a cell/td click event to capture the click and then execute the inline update/change. Moreover if I use row click event, check event is triggered as well. Am I doing somthing wrong?

Regards,

initSort causing errors in IE11, current FF, and Chrome as well

I've gotten this message in the devtools on all three major browsers, in bootstrap-table.js, specifically at line 300 (as of my pull just now):

this.data.sort(function(a, b) {
//and etc.

The verbage of the error in IE11 is "Object doesn't support property or method 'sort'"

When using radio button for rows, getSelections returns bad

getSelections returns the result list as if checkboxes are used. It just adds-up any item that was previously radio-selected.

To reproduce:

  • create list with at least two items, add radio column
  • click on one item
  • call getSelections, the result is correct
  • change selection to second item
  • call getSelections, the result now has two items

data-checkbox="true" erases the label on the column

I have a table with two columns, "assigned" and "complete," per row, and turning the cell into a checkbox is overwriting the column names and just putting a checkbox in that th tag. And I apologize for opening three issues in barely over 24 hours...

<th data-field="COMPLETE" data-title="Complete" data-align="left" data-sortable="false" data-checkbox="true">Complete</th>
<th data-field="ASSIGNED" data-title="Assigned" data-align="left" data-sortable="false" data-checkbox="true">Assigned</th>

您的 Sort Table

當 對 name 進行排列時
名稱後面的數字排列不正確
例如 test1test20
小到大 test1
test20
大到小 正常應該 test20~test1

可是您的為 test9 ......

How do I add an edit button to each row

I use MVC and have the need to be able to display data in the table and also have an edit button displayed as the last column.

Can you help.

Regards,

Matt

Item select from multiple pages

Dear wenzhixin,

How to select multiple items from different pages. For every page checkbox gets refreshed and I could only see selected items from that page. If I want to select multiple items from different pages how to do it.

Pagination issue in bootstrap 2.3

There is a bug using pagination whe you targer bootstrap 2.3.
In 2.3 we need an extra div around the ul where the class pagination should be put on.

this could be solved in the initPagination function

Empty table shows two rows of headers

Hey @wenzhixin, thanks for making this bootstrap table, it's quite useful!
I'm having one issue when I initialize by doing $('#table').bootstrapTable(); I have two rows of headers for some reason. Note, I did not use data-url="data1.json" in my html.

Any help would be great! Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.