table missing style, css
See original GitHub issueI am learning react, new bee , trying bootstrap table, table renders, but without any style , I am missing something, my table class src below , I included css using [import 'react-bootstrap-table/dist/react-bootstrap-table-all.min.css'
] not sure if this is write?, this project is in github, project link
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
import 'react-bootstrap-table/dist/react-bootstrap-table-all.min.css';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item name ' + id,
price: 2100 + i
});
}
}
addProducts(70);
export default class DefaultPaginationTable extends React.Component {
constructor(props) {
super(props);
}
renderShowsTotal(start, to, total) {
return (
<p style={ { color: 'blue' } }>
From { start } to { to }, totals is { total } (its a customize text)
</p>
);
}
render() {
const options = {
page: 1,
sizePerPageList: [ {
text: '5', value: 5
}, {
text: '10', value: 10
}, {
text: '20', value: 20
} ]
,sizePerPage: 5, // which size per page you want to locate as default
pageStartIndex: 0, // where to start counting the pages
paginationSize: 10, // the pagination bar size.
prePage: 'Prev', // Previous page button text
nextPage: 'Next', // Next page button text
firstPage: 'First', // First page button text
lastPage: 'Last', // Last page button text
paginationShowsTotal: this.renderShowsTotal
};
return (
<div>
<BootstrapTable data={ products } pagination={ true } options={options} >
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable>
</div>
);
}
}`
image of rendered table
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
How to remove all inherited CSS formatting for a table?
Try this. From Eric Meyer's Reset CSS table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline:...
Read more >Styling tables - Learn web development | MDN
This article provides a guide to making HTML tables look good, with some specific table styling techniques highlighted. Prerequisites: HTML ...
Read more >How To Style a Table with CSS | DigitalOcean
The first half of this tutorial will focus on a common table layout that mostly uses the browser's default styles for table elements....
Read more >Markdown tables missing CSS style · Issue #8097 - GitHub
I'm guessing your issue is that it is un-styled. Adding class="table" to the table element turns it into this: image. Is that what...
Read more >Missing style.css stylesheet error - 17th Avenue Support Desk
Missing style.css stylesheet error. This error will occur if you upload the incorrect theme file onto your Themes page.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
applying jquery and bootstrap script and link tag resolved the issue.
@AllenFang
Any solution for this ? the bootstrap.min.css destroy the old page design when import it into he index.html