bootstrap-table icon indicating copy to clipboard operation
bootstrap-table copied to clipboard

4 questions

Open vespino opened this issue 10 months ago • 10 comments

Description

I have been using datatables, but just found this Bootstrap addon and it was very simple to create my first table, similar to what I had before. A few things:

  • Can I alternate rows colors like the default layout on datatables?

screenshot

  • When hiding a column using data-visible="false" the right table border seems to disappear

screenshot

  • I have a column with numbers of which some have a ~ in front of it. Is it possible to sort by the value skipping the ~ ?

screenshot

  • Is it possible to hide "Showing 1 to 10 of 800 rows per page" (pagination-info) without the use of CSS?

Example(s)

No response

vespino avatar Apr 03 '24 14:04 vespino

  1. You can use the rowStyle option or cellStyle column option. https://examples.bootstrap-table.com/#options/row-style.htm https://examples.bootstrap-table.com/index.html#column-options/cell-style.html

  2. Didn't find the problem you said: https://examples.bootstrap-table.com/index.html#column-options/visible.html

  3. You can use the sorter column: https://examples.bootstrap-table.com/index.html#column-options/sorter.html

  4. https://bootstrap-table.com/docs/api/table-options/#paginationparts

wenzhixin avatar Apr 04 '24 01:04 wenzhixin

Solved 1 by adding the table-striped class to the table: https://www.w3schools.com/bootstrap/bootstrap_tables.asp

I will have to look into 2, it keeps removing the right border for me. This example also seems to remove it: https://live.bootstrap-table.com/example/welcomes/from-html.html

Solved 3 using the example, thanks.

Is 4 possible without Javascript? Except for the "sorter" I have been able to go without for all other options. If not, I'll just hide it using CSS.

vespino avatar Apr 04 '24 07:04 vespino

Is 4 possible without Javascript?

Yes: https://live.bootstrap-table.com/code/wenzhixin/17458

wenzhixin avatar Apr 11 '24 03:04 wenzhixin

Cheers. 2 remains though.

vespino avatar Apr 11 '24 05:04 vespino

Please provide an Online Example to show your problem. Thanks!

wenzhixin avatar Apr 11 '24 07:04 wenzhixin

Right border gone: https://live.bootstrap-table.com/code/vespino/17459

Right border not gone: https://live.bootstrap-table.com/code/vespino/17460

vespino avatar Apr 11 '24 08:04 vespino

image

image

I am using Chrome for the test.

wenzhixin avatar Apr 11 '24 10:04 wenzhixin

Firefox:
Bildschirmfoto 2024-04-11 um 12 47 28

UtechtDustin avatar Apr 11 '24 10:04 UtechtDustin

Then it must be a Firefox issue, because that is the browser I'm using. When opening 17460 I need to resize the result pane before the right border appears. This in both Firefox and Chrome.

vespino avatar Apr 11 '24 10:04 vespino

17460 works fine for me, without resizing anything.

UtechtDustin avatar Apr 11 '24 10:04 UtechtDustin