Comments (12)
@NilesB raised a point about what if the column widths go over 100
in total, luckily for us the widths get scaled, here's a demo.
from react-dynamic-data-table.
Have you considered what to do if you do not want to specify a column's width in the middle of the table?
Maybe something similar to the following.
<DynamicDataTable
rows={this.state.users}
columnWidths={[10, 50, null, 10]}
/>
from react-dynamic-data-table.
@dextermb I much prefer this object format. 👍
from react-dynamic-data-table.
Have you considered what to do if you do not want to specify a column's width in the middle of the table?
Maybe something similar to the following.
<DynamicDataTable rows={this.state.users} columnWidths={[10, 50, null, 10]} />
I do prefer the array option, with using null
. But it's worth raising this:
<DynamicDataTable
rows={this.state.users}
columnWidths={{
id: 10,
name: 50,
// email: null
address: 10
}}
/>
from react-dynamic-data-table.
cc @NilesB @AlexCatch @wheatleyjj @JacobBrassington
from react-dynamic-data-table.
@dextermb I much prefer this object format. 👍
Definitely more functional.
from react-dynamic-data-table.
Firstly i am assuming that the key's of the object would correspond to the column name? Secondly would this be in px
or %
?
from react-dynamic-data-table.
@JacobBrassington Column names is correct, and I believe @dextermb was intending the values to be percentages.
from react-dynamic-data-table.
Firstly i am assuming that the key's of the object would correspond to the column name? Secondly would this be in
px
or%
?
As <td width>
has been deprecated, which I did not notice, a style attribute would have to be added, this would be in percentages.
from react-dynamic-data-table.
It may be a good idea to make the table have an overflow: scroll
on on the x axis for incase the user enters total values over 100%.
from react-dynamic-data-table.
It may be a good idea to make the table have an
overflow: scroll
on on the x axis for incase the user enters total values over 100%.
We could do, but the default behaviour is that table cell widths scale. So if they go over 100% then it still works out the difference. Here's the demo I posted further up. Maybe we set the overflow as a prop
from react-dynamic-data-table.
@JacobBrassington That functionality could be provided as another prop either specific to this case, or via a general style
prop.
from react-dynamic-data-table.
Related Issues (20)
- Pagination not work HOT 1
- Data table components use unsafe lifecyle functions which throw warnings in the console
- Export tools
- Do not stringify object rows, skip over them instead HOT 6
- Do not update the loading prop after the first page HOT 2
- Remove anonymous functions HOT 2
- Split DynamicDataTable into multiple components
- Do not render an empty cell if no buttons are set HOT 2
- Allow valid react elements to be used in data manipulator HOT 3
- Add the ability to order table columns HOT 1
- Do not show loading state when changing pages after the first time HOT 2
- Add the ability to disable the initial AJAX load
- Check for null before stringifying objects HOT 7
- `dataItemManipulator` prop not documented fully
- Add `disabled` or `loading` attribute to buttons
- Add all supported props to prop types for the AjaxDynamicDataTable. HOT 3
- Unable to do Bulk select HOT 4
- Update propTypes on DataRow to use valid prop type function HOT 2
- Update defaultProps for `buttons` on DataTable HOT 2
- Default value for `buttons` prop does not handle query strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-dynamic-data-table.