Milestone to v3.0.0
AllenFang opened this issue Β· 100 comments
v3.0.0
I'm going to start a plan for react-bootstrap-table@3.0.0
, so I wonder if any ideas for v3.0.0
, you can tell me in this threads. Anyway, I've considered some issues must be solve in v3.0.0
(may not, it depend):
- Make all the components customizable(include pagination, insert button or modal etc.)
There're the relative issues:
#492, #469, #476, #356, #251, #172, #487, #484, #462, #456, #426 etc. - Remove the column filter on bottom of table
- Remove the dependency for
bootstrap.js
Feel free to give any suggestion or feedback. BTW, if u r interesting for contributing this repo, it's welcome
Thanks
@AllenFang
Hi Allen, I've been using this project very heavily for some work I've done recently. Would like to contribute soon but since I've been full time on my project I've unfortunately not had time. Something I did start to work on but haven't had time to implement is the ability to copy one/multiple rows (depending on whether you've used checkbox/radio for select). The other is an import from CSV function. I've just added custom buttons for this myself but would be useful to have as part of the table. (Sorry in advance if these have been mentioned before). Some other thoughts that come to mind are: custom rendered cells available in add dialog, modal dialog being popped up for cell edit, mass paste to edit many cells at once. Thanks for all your hard work on this - it's a great project!
@lbargery, I'm glad to hear your feedback.
copy one/multiple rows
it's a cool feature!
import from CSV
It's also a awesome feature, someone who has asked this feature but I just reject lol. but it's welcome to make a PR.
custom rendered cells available in add dialog, modal dialog being popped up for cell edit
that's why I want to bump to v3.0.0
, it's a commons problem which a lots of user encounter.
Possible to add #220 to it? Not sure what to call it maybe nested sorting? Multiple sorting? Anyway just a suggestion love what you have done so far just started using this in a project and it saved me a ton of time. Keep up the good work.
HI @Amertz08, for #220, I've no any plan to do it, I want to keep the sort simple and the sorting behavior in most table component does not support the nested sorting
or something like that #220. Anyway, there's a lot of important thing need to be done, so I wont support #220 in near future, But PR is welcome π
sorry sir
Hello @AllenFang .
Thank you for you good project. It very simple for using.
I'm waiting for removing bootstrap.js
from project π
Possible to add a view all to the pagination? EDIT: realized there is an easy workaround for this.
@Amertz08, it's a much custom functionality for users. Maybe I will try to implement it. :)
there is an easy workaround for this
so what's that?
Hi,
My suggestions:
- have data not being only an array. It could be an array but it could also be an object which provide getCount() and getItem() (promise) methods so data loading could be lazy. In this case, of course, sorting/filtering should also be custom callbacks.
- I had problems with the default "height=100%" : pagination was outside of the screen. Never found why. But I had to use "height=auto" and I wonder if it shouldn't be the default value
- For custom buttons, there should be a way to ling them to selected data : the button is always clickable and expect no data OR the button can only be clicked if data is selected and expect the datas as a parameter .
Also, I did not found any "developper" page which explain how to contribute, package, ... It may be obvious for javascript developpers, but I'm not and I need some time to understand.
Tell us when you'll make the branch so we can contibute.
@AllenFang I need the ability to provide custom cell editors ( see #162)
I'm going to start on a PR. Will model it after how the custom column filter components are implemented. Will ask for feedback on the interface before I get too far.
class Parent extends React.Component {
constructor(props) {
super(props);
this.state = {
pagination: true
};
}
_togglePagination() {
this.setState({ pagination: !this.state.pagination });
}
render() {
return (
<div>
<button onClick={ ::this._togglePagination } >Toggle</button>
<BootstrapTable
pagination={this.state.pagination}>
</BootstrapTable>
</div>
)
}
}
@AllenFang hacky but it worked.
@mbaroukh, I'll thinks about your suggestion, and will open a branch for v3.0.0
. Sorry for lately reply, I'm busy on work ;(
hey thanks for the next versions. If we can have resizable columns , that will be great..
also one more wish -
for filter: can we have a button, clicking on which the filter row opens up..
something like attached screenshot. i did this using jquery.. but it will be good to have in the plugin itself..
Screenshot1 - filter controls hidden
Screenshot2 - on click of icons in the header, the filter row opens
@ssjogus, your suggestion is very well, I will consider it :) Thanks you. But it really need some time ;(
Following is the proposal for showing how to do custom component:
Firstly, if you only want to custom the button(e.g., insertRow, exportCVS) or search field, you can do it like that:
function generateDeleteBtn(delBtnClick) {
return (
<button onClick={ delBtnClick }>MyDeleteBtn</button>
);
}
render() {
return(
<BootstrapTable insertRow deleteRow={ generateDeleteBtn }>
//...
</BootstrapTable>
);
}
However, if you need to customize the whole ToolBar, e.g., add you component, change the layout. You can do it like following:
function generateInsertBtn(onClick) {
return (
<button>MyInsertBtn</button>
);
}
function generateSearchField(onKeyUp) {
return (
<input type='text' />
);
}
<BSTableToolBar style={ { ... } } className={ ... }>
<InsertBtn component={ generateInsertBtn }/>
<div style={ { ... } }>
<Search component={ generateSearchField }/>
</div>
</BSTableToolBar>
<BootstrapTable toolBar insertRow deleteRow>
</BootstrapTable>
You need to enable toolBar
props on <BootstrapTable>
, if configured, I will assume you want to customize the tool bar so that you need to render <BSTableToolBar>
component and it's body.
Which means react-bootstrap-table
does not render insert button depends on insertRow={true}
, so insertRow
, deleteRow
, exportCSV
will all invalid. In this situation, you have best ability to do customization.
BTW, I will export e.g., InsertBtn
, DeleteBtn
, ExportCSVBtn
components, if you only want to change the styles or layout on ToolBar and it's easy to be done.
Hope it all works and feel free to discuss for this proposal.
Thanks you :)
v3.0.0 alpha todo list
- ToolBar customizable
- Insert button customizable
- delete button customizable
- exportCSV button customizable
- search field customizable
- Remove dependencies on
jQuery
andbootstrap.js
- Use other modal library instead of native bootstrap modal
- Insert modal customizable
- Selection cell customizable(Released on
v2.4.2
) - Size per page dropdown customizable
- Cell edit customizable(Released on
v2.4.0
)
I know there're some features I miss, but I thinks make the react-bootstrap-table
more customizable is most important thing than each other in the future, so if any feature I miss, I'll consider to add it after alpha release.
The branch I've created v3.0.0-dev
.
Thanks again :0
@ssjogus I was able to use react-resizable to create resizable columns for react-bootstrap-table. Try it out to see if that solves your problem. Let me know if you would like me to share a gist example.
@tarim, it's in the scope of ToolBar customizable, actually, I'll give you more ability to do anything.
@abhirao thanks for the plugin suggestion. but will it work with the columns? i dont want to resize the whole table, but the columns should be resizable..
@ssjogus, the resizable columns is a big challenge in react-bootstrap-table
, I'm not sure that I can support this feature, sorry ;(
Hi, @AllenFang
How about make the row selection has the number limitation ( i.e. the total number of rows that are selected should no more than two or a customized value) ?
Thanks a lot.
@AllenFang Thank you so much. This really helps me a lot!
@AllenFang How about lazy loading or performance issue? suppose i need to render 2000 rows of data, i wish to do it on user scroll rather then do it at one go. But the search needs to be on whole data set and not just the one shown. So if you can think about it in your next release? Thank You
I would love to see an Infinite Scrolling Feature. Something like I give the table an array with like 10.000 rows but it only displays 100 and then it loads the rest dynamically.
@orangecoding, I'll try my best to do this, but I focus on making component more customizable currently. so PR is welcome
@AllenFang Is there a way i can group the table by certain data type? If not, will this be supported in near future. I know the sorting would be weird but without sorting and just grouping the table rows with certain data types would be a good one.
A footer for column totals would be great!
I need a grouping feature as well (including column totals). I was planning on putting together a proposal for the API - I would want it to work on local data or when provided with data from remote source.
@AllenFang I can get a proposal together and work on a PR.
@orangecoding @AllenFang - could look at something like react-virtualized for that functionality.
@AllenFang i need to add a last column with 2 button (Edit & Delete) on every row
@AllenFang Great plugin Allen. Very useful. Not sure these suggestions are still live. I've got one suggestion.
- Edits in a modal window that would allow validation
Thanks again for a great plugin
Thanks for an awesome package. I'm using bootstrap 4 that has dropped glyphicons. Are you planning to move to Font awesome or similar?
@gforge, good idea, but I think this need to be delay, I would like to release v3.0.0
as soon as possible, if I have time, I'll change to Font awesome.
BTW, PR is welcome :)
Great, I added the basic Font Awesome structure (basically done search-replace). Update: npm start
crashes when accessing localhost:3004 due to old react-router dependency. Updating to version 2.8.1 solved this.
What do you want me to test before doing a PR? Also, adding something to the README is probably a good idea as people have to add an additional FA dependency.
@AllenFang It would be nice if we could pass a 'disabled' prop to DeleteButton. That way we could enable/disable the button based on some criteria, such as if any rows are selected. Right now the button is always enabled even if no rows are selected, which is kind of a UX issue.
It would be nice if we could pass a 'disabled' prop to DeleteButton. That way we could enable/disable the button based on some criteria, such as if any rows are selected. Right now the button is always enabled even if no rows are selected, which is kind of a UX issue.
@j-francisco, thanks, it sounds good!!
Adding resizable columns is probably a nightmare, but maybe supporting multi-line content (automatically expanding rows in height when some content does not fit in a cell) is easier and actually more useful (I hate drag and drop and you are never guaranteed to see the end of the string on your screen). Or is it already possible? Real-life, useful example:
(but it could also set all table row heights to the highest).
hi @jdelafon, I think it's more better than resizing column and maybe it's possible to implement, but need some time to implement it with react-bootstrap-table
.
Yeah +1 for multi-line content rather than resizable columns π
@AllenFang: option to move item per page to the top of table is cool.
@jdelafon
For multi-line content, you should be able to do it only with CSS :
.react-bs-table .table .tbody {
.break-word td, tr .break-word {
white-space: normal;
word-wrap: break-word;
}
}
And set the following option on BootstrapTable :
trClassName: 'break-word'
Any chance for Auto Paging Load?
Any chance for Auto Paging Load?
could you please explain more?
@AllenFang: Next page auto load when scrolling down to bottom of the page. E.g: http://jscroll.com/
@kakariko-village what you are referring to is called infinite scrolling and is another concept of navigating through content. I don't think these both concepts should be combined.
As for infinite scrolling, there is another discussion going on with the actual agreement that this would be a nice feature but is postponed to a later version.
@AllenFang Make possible the accessibility of sub-objects like says kopax in this issue: #50
It would be great! π
https://github.com/AllenFang/react-bootstrap-table/releases/tag/v3.0.0-beta.2
beta pre-released, if get any interesting, you can check it out by npm install react-bootstrap-table@3.0.0-beta.2
.
and I'll keep to improve beta and release a final production version after one month.
Hi Allen, first, thanks for all your effort.
I have come across a bug in 3.0.0-beta.2 related to pagination and setting the current page size. Basically, SizePerPageDropDown requires currSizePerPage to be a string,
https://github.com/AllenFang/react-bootstrap-table/blob/v3.0.0-dev/src/pagination/SizePerPageDropDown.js#L43
but in PaginationList, this is passed in using the sizePerPage prop:
https://github.com/AllenFang/react-bootstrap-table/blob/v3.0.0-dev/src/pagination/PaginationList.js#L158
and PaginationList requires the sizePerPage prop to be a number:
https://github.com/AllenFang/react-bootstrap-table/blob/v3.0.0-dev/src/pagination/PaginationList.js#L261
This results in a warning being thrown. A simple String(sizePerPage)
cast would fix this.
@JohnUiterwyk, thank your very much, I'll check it out π
@AllenFang Can you please make pagination option configurable like user want pagination in toolbar or at the bottom of table?
@KalpanaPagariya, could you please explain it more detail? Thanks :)
Hi Allen,
I am a newbie with react/redux frameworks, but the way you've implemented table functionality based on components I like very much!
The feature that might be useful for others is to let edit functionality be not only in cell mode but in modal popup window as well, similar to custom insert modal. The insert/edit forms might be complex and not all its data may be displayed in the table view.
Hi @serenya, thanks your advise, actually the editing mode in pop modal is requested before, I'll consider to add it. But for the term for cell edit which only update the cell instead of row, so in my opinion, it should be simply to implement on cell instead a pop modal. Anyway, you can use custom cell editing to achieve your requirement, check example.
@KalpanaPagariya, this bug will be fixed after v3.0.0
. you can test it on v3.0.0-beta.2
. Let me know if problem still remain. Thanks
How can I install this beta version using npm?
@KalpanaPagariya, npm install react-bootstrap-table@3.0.0-beta.2
Still facing the issue with this version. pagination overlapping wit the upper table if minimized
@KalpanaPagariya, could you confirm that you use beta version for v3.0.0
? cause of I cant reproduce it.
Hi @AllenFang
Recently I've noticed that another release 3.0.0-beta3 had been released. And I am curious why for this release there are no InsertModal.js, InsertModalBody.js and other files related to the popup that appears on insert action under src/toolbar folder? At the same time all of them are there for the release 3.0.0-beta2.
@serenya, sorry for making a mistake, I've released https://github.com/AllenFang/react-bootstrap-table/releases/tag/v3.0.0-beta.4
@AllenFang I have two question:
-
Is custom button on toolbar supports now? (in first post in this issue you tell about it and point to #251)
I think it's related to: #251 and #528
Something like: https://www.baroukh.com/nb/react-bootstrap-table-doc/#/examples/custom -
When you plan release version 3 stable version?
Can anyone provide an update on a multi-select filter?
@cyclops24, sorry for lately reply,
- yes, there're some examples, let me know if you still have question about implementation
2, Certainly on February.
@robbieyng, #832 have the same issue and like I said I'll do it, but there're a lots of thing need to do, so you can take a custom filter as a workaround and I will support this as soon as possible.
This is probably way too late and has probably been mentioned elsewhere, but it would be good to be able to add a custom summary / footer row to the table, for showing column totals etc.
Obviously as the data in each column is of a different type, the implementation would have to be pluggable. Currently we have a very hacky solution where we modify the html of the component after it has rendered in order to insert the required total row, but its porbably not very hard to include in the main component.
Its also nice that sorting is provided "out of the box" so to speak, but it would be even better to be able to pass a function or lamba that was customizable, because for example we have a column of percents that are displayed with the % symbol, and they are ordered alphabetically which doesnt make a lot of sense in that context. Array.sort i believe takes object a and b and returns an integer - perhaps a similar interface could work here?
it would be good to be able to add a custom summary / footer row to the table, for showing column totals etc.
yap, there're also couple issues and PR focus on it, I'll handle them as soon as possible, but it really need some time.
ts also nice that sorting is provided "out of the box" so to speak, but it would be even better to be able to pass a function or lamba that was customizable, because for example we have a column of percents that are displayed with the % symbol, and they are ordered alphabetically which doesnt make a lot of sense in that context. Array.sort i believe takes object a and b and returns an integer - perhaps a similar interface could work here?
it that custom sort function will help you? example
Re:sorting.. Awesome. Exactly what I need hehe.. Makes you wonder what other "missing" functionality is already there
But all in all, I have to say bravo on a well designed component!
the custom footer row
I'll work hard for it :)
a callback when the pagination size changed
check this
@AllenFang This is a great library. The project we are working on use it heavily for all the tables. However, we noticed the column is not sizeable. If it is too hard to implement, then what would be the work-around to handle long text in table cell? Word wrapping? Please let me know.
@shadeven, thanks your feedback, for the long text problem, #497 (comment) is a little feedback, actually, I only make cell ellipsis if text overflow, maybe I can give a try for word wrap, but I remember that I've tried it but got some trouble with unalign column issues. Anyway, I'll have a experiment again because I've fixed couple unalign bug and maybe word wrap is work now ?!
@AllenFang thanks for the prompt reply. I am looking forward to hear from your experiment.
I change this line to normal
instead nowrap
, and a long text demo result as following:
I also try to configure a narrow width and resize window, it work fine also.(Lucky without any unalign issue happen) If this result is match your expectation, I can forward to support this feature, but for a compatibility design, I'll make this configurable and preserve nowrap
still as default.
@AllenFang This is exactly what we need! Thanks for your hard work! When can we expect this feature released?
I think I can support this feature in next or next two version if without any trouble on implementation :)
@AllenFang Please let me know when it is released.
Hello @AllenFang, thanks for all this!
When is the release of the v3 planned? Is there gonna be a lot of changes between beta-10 and the final release 3.0.0 ? I think it's close to be released so it should be okay to jump on beta-10 right now?
@Vadorequest, I'll release it as soon as possible, I'm going to implement the keyboard navigation and integrate the cell editing with tab.
v3.0.0 release, I know there still are a lots of thing I need to improve or fix, in near future, I'll pretty busy on my job.. but I'll keep to support this project when I back from my job.
Any feedbacks or bug report is welcome, thanks.
@AllenFang thanks for you work on react-bootstrap-table! I'm having issues with the modal in my local environment vs when deployed. When I click on the 'new' button when deployed to heroku nothing happens... There are no errors in the react dev tools. I'm using version 3.0.0 and have imported the css. When running the code on localhost everything works as expected - modal pops up when clicked. Any direction is greatly appreciated. Thanks in advance for your help.
Hi @AllenFang - We've start to use your amazing project and use currently 2.11. Is there a description of all additions of version 3? Do you recommend to stay on 2.11 until you officially release 3 or do you think beta 11 is stable enough ?
Thanks for your great work and your advices ?
@StephReaves, could you please help me to confirm if you use the v2.x
and deploy on heroku is work well?
@philjoseph, I'm going to a travel and I'll update official note for v3.0.0
. Actually, I think using the newest version is much better, it support keyboard navigation and customization. Anyway, you can try v3.0.0
and any feedback is welcome, if you dont like it, use v2.11.x
is well, they all are stable.
Thanks
HI AllenFang, You have released v3.0.0, but examples are still pointing to jquery and bootstrap. Can you please update the examples also? Like index.html still refers to jquery and bootstrap.
@AllenFang thanks for following up. Was able to get 3.0.0 working by changing some configurations in webpack. Thanks again!
Just getting going with React and react-bootstrap-table and I have another question on customizing the modal through insert Row. Basically, I don't want all of the columns to be displayed in the modal. For instance in your basic example, I only will display Product Price as an input options, but not Product Name or Product Id. Would I go about doing this by addressing the insertRow {true} settings? Apologies, but I couldn't find anything related in the docs or in a google search.
One other question, is there a faq or slack channel for react-bootstrap-table where I should be directing my questions?
Sorry for lately reply due to my long trip ;)
@KalpanaPagariya, thanks for remind, I forgot it.
@StephReaves
I think you can do it by custom modal, you can control which input field can display on modal, feel free to ask me anything by opening issue on this repo :)
@AllenFang I know you've mentioned #220 before and you talked about nesting sorts, this isn't really the main issue as far as I can see. It seems to be a simple "third" state to the sorting, which is "none".
In fact this is precisely what the table does currently if you have no default sort and haven't as-yet selected to sort by anything... It's just that after selecting one, you can't get "back" to the un-sorted state.
@AllenFang thanks your hard working bro!
So are there any solutions about the wrapping of table header and cell?
I tried like this:
<BootstrapTable id='mdm-table'
containerStyle={{'marginTop': '1em', 'whiteSpace': 'normal', 'wordWrap': 'break-word'}}
data={data} striped hover search exportCSV condensed pagination options={this.options}>
but only marginTop: 1em
works.
And it is not a good choice to change white-space: nowrap
in react-bootstrap-table.min.css
, so what should we do about it?
Thanks again.
@XidongHuang, is this ?
@AllenFang Yes sir, that is what I want, thank you so much!
But a short question here, is it necessary to separate those css styling for each column? Or I can set them in parent container <BootstrapTable />
for the whole table?
But a short question here, is it necessary to separate those css styling for each column? Or I can set them in parent container for the whole table?
@XidongHuang You can give a try but I didn't try it before.
Hi @AllenFang! First and foremost is huge thanks for your library! We're using this library for some quite of time for all of our projects and it works perfectly!
Just want to ask, is there any feature to export one or more CSV with one table? For instance the default exportCSV button is exporting the data that is display on the table but the other is exporting other data.
I was trying to override the options by creating a button group just like this
return ( <ButtonGroup> {props.exportCSVBtn} <ExportCSVButton btnText='Down CSV' onClick={ () => this.handleExportCSVParts() }/> </ButtonGroup> );
However I was expecting that the data inside the handleExportCSVParts function will be exported, data type is array.
Is there such this kind of feature export multiple CSV with one table? Huge thanks!
@christianbalderrama currently, we only can export the data from table. if you want to export some data, you can try to write yourself code for exporting csv, you can use filesaver
and Blob
to achieve your requirement. some example source code you can reference by https://github.com/AllenFang/react-bootstrap-table/blob/master/src/csv_export_util.js
thanks
As I make remote={true}, filters on each column stopped working
How can I work with filter in remote pagination