imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

Custom position for filter input field, pagination options, and page navigation #11

Closed rockwelln closed 6 years ago

rockwelln commented 6 years ago

Hello,

After looking at the README, I noticed this point in the "next features" section:

Custom position for filter input field, pagination options, and page navigation

And, indeed I can imagine many people may desire another layout for the table. But I don't think it's a good idea to implemented it in the library itself.

If someone want to change the layout, the Datatable class may be extended and the render() function overwritten to put the components wherever he wants. Actually, I think the documentation should just mention this possibility.

Just my 2c

imballinst commented 6 years ago

Back then (and maybe until just now), I think it would be easier for any user if there is something like this as props:

position: {
  pagination: 'topleft'
  filter: 'topright'
}

or some sort of that. But now you mention that idea, yeah I think it's better to just extend the table and override the render() function as they could result in the same thing (with better flexibility). It also means less features to be made and maintained (yay?). Great point, I will mention this thing in the README next version.

imballinst commented 6 years ago

Hello, when you have some free time, please kindly check this PR https://github.com/Imballinst/react-bs-datatable/pull/12

Thanks :)