AllenFang / react-bootstrap-table

A Bootstrap table built with React.js
https://allenfang.github.io/react-bootstrap-table/
MIT License
2.24k stars 783 forks source link

Select All checkbox customization (Display any other icon instead of checkbox) #2125

Closed chiragmansata closed 3 years ago

chiragmansata commented 3 years ago

Hello, Firstly to say its a great library to work with. However I need help on displaying any other icon in pace of select all check box. (As shown in picture) My requirement states that user shall be able to select the table rows, however there is max limitation of 8 rows only. So basically I need the select feature of the table but don't need the SelectAll feature.

I am aware that using 'react-bs-select-all' class I can hide the SelectAll checkbox but doing this makes the table look incomplete as the Heading of one column shall remain blank then.

Therefore seeking your help. Thanks in advance. Issue

julienmouraddotcom commented 3 years ago

@chiragmansata you're probably looking for: selectionHeaderRenderer

Reference: https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/row-select-props.html#selectrowselectionheaderrenderer-function

Storybook: https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Row%20Selection&selectedStory=Custom%20Selection&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

chiragmansata commented 3 years ago

@julienmouraddotcom Yes, exactly looking for the same. Thanks a lot for the reference.