Comments (5)
Does your table have multiple header rows? This module is not designed for tables with multiple header rows and I think I would advise against it. It might be confusing for a user to see a table with multiple header rows and I'm not sure what meaning that would have.
Anyways, I just tried this in the demo app and using ng-repeat
on a table header row resulted in each header row getting a master checkbox but row selection still worked. I don't see anything else that would break row selection.
For me to help you further I would need to see a plunker, code pen, etc. that clearly demonstrates the issue.
from md-data-table.
No i dont have multiple header rows, my markup looks like this right now:
<md-data-table-container> <table md-data-table md-row-select="selected"> <thead md-order="query.order"> <tr data-ng-repeat="selection in config.configs"> <th order-by="name" data-ng-repeat="entry in selection">{{entry.attributeName}}</th> </tr> </thead> <tbody md-auto-select> <tr data-ng-repeat="selection in config.configs | orderBy: query.order | filter: skip | limitTo: query.limit"> <td data-ng-repeat="entry in selection">{{entry.valueName}}</td> </tr> </tbody> </table> </md-data-table-container>
while configs looks like this:
[ { "productId":175, "productName":"test", "configs":[ [ { "attributeId":"176", "attributeName":"Durchmesser", "valueId":180, "valueName":"25cm" }, { "attributeId":"177", "attributeName":"Lichtstärke", "valueId":181, "valueName":"50l" }, { "attributeId":"178", "attributeName":"Radius", "valueId":183, "valueName":"10cm" }, { "attributeId":"179", "attributeName":"Preis", "valueId":182, "valueName":"300€" } ] ] } ]
I loop over the configs array and create a new table for each entry.
from md-data-table.
In your thead
element, you are using ng-repeat
on the tr
element. This could potentially produce multiple header rows if you had more that one object in your configs
array. I might suggest reconsidering the format of your object or to not use ng-repeat
to access the first object in an array.
I've created a fork-able Codepen under the Demo section in the README
. Please use this to reproduce the issue and I will try to fix it for you.
from md-data-table.
For me it's not possible not to use ng-repeat, because the table head has a dynamic parameter size. (I don't know how much elements thead will contain).
I forked your Codepen http://codepen.io/anon/pen/OVoWbE
from md-data-table.
The reason row selection is not working is because you are using data-ng-repeat
instead of ng-repeat
in the table body. In the module I'm checking if the ng-repeat
attribute exists.
I updated your Codepen.
Do you need to validate your HTML? For now you can use ng-repeat
and row selection should work. I'm going to rename this issue to normalized attribute names.
from md-data-table.
Related Issues (20)
- Global setting
- How to select all rows? HOT 8
- Exclude certain rows from sorting
- Please bump version and publish to npm
- Custom cell disable using value - Md-data-table - AngularJS
- Sorting when using md-virtual-repeat and md-on-demand
- how can i have a fixed header when using md-vritual-repeat-conatiner
- Missing rows with mdVirtualRepeat
- Sticky column HOT 2
- Multiple parameter ordering HOT 1
- Refresh data table after edit, add, update.
- $mdEditDialog large throws an error while calling $http service on save.
- how to print md data table without order by arrow icon HOT 1
- Pagination localisation options are insufficient
- Live Demo has security breach (Kinda) HOT 3
- maintain sorting state in and out of session
- md-table-pagination not working for server side binding(other than page 1) HOT 1
- Selectable Columns Callback is not working
- Get limited data from server rather binding all data
- Bring md-select selected from server
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 md-data-table.