-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable - Row Expansion can't disable expander for certain rows #729
Comments
I have the same problem. Were you able to figure out a solution? |
Unfortunately, no response from prime team.... have workaround only(here im selecting grid by class name .orln-agree-tbl)
|
Try this: |
Here is a not-so-ugly workaround, using the <p-dataTable [value]="listData" [totalRecords]="length" [rows]="10" [paginator]="true"
[responsive]="true" [pageLinks]="6" [rowsPerPageOptions]="[5,10,20]" expandableRows="true"
[rowStyleClass]="rowClass"> In your component.ts: rowClass(rowData) {
return rowData.HasAnnexes ? '' : 'noExpander';
} In your css: .noExpander span.ui-row-toggler {
display: none;
} The |
xuanshenbo tank Yoo 4 your solution. It looks sexy, but not working 4 me. Somehow rowStyleClass functions isnt called in my case. Dont know why - maybe its caused by lazyloading or some attribute (there was bug reported involved scrollable attribute #1613). |
OK after restoring packages with npm Yours sholution works perfectly. Once again thanks xuanshenbo |
For anyone still looking for an alternative to the above solution (since that did not work for me), here is what i did-
dtSeasons here is the unique id of the datatable
|
@pserafin I am also facing same problem. I want to hide that expender whene there is know data. So I tried ur approach but noExpender clas adding. |
@karthiks3000 Hi! Ur method is working but Icon is hiding on mouseOver out. Its showing again when mouseover. Can u tell me how to resole that problem.. |
Hi,
firstI'll paste my code 4 grid:
I have to major issues with this grid:
Property<p-column
expander="" doesnt read value - doesnt matter if I set it to true or false => expander will always be enableThe text was updated successfully, but these errors were encountered: