-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 group header colspan doesn't span full row when table has selection column #3685
Comments
same in 3.12.2. |
any fix for this? having the same problem : vue 3 |
@csmaller we ended up doing a workaround by wrapping the table in another component and manually setting the colspan. here's an updated codesanbox with an example https://codesandbox.io/s/angry-sara-iqkzs6. I can't remember if the setTimeout was needed or if nextTick would have been fine, but either way I think you'd get the main idea. |
Thank you, I had to do a similar workaround almost the same code and yours seems a bit more elegant. I need to make an async call to get the data first so a timeout didn't work...and a I have three tables with multiple selections and different column count so It needs to get each colspan then add 1 to each, plus it is in Vue3. For anyone using Vue3 using TS I will post what I did here: `const addColspanToHeader = () => { const groupHeaders = document.querySelectorAll("table tbody .p-rowgroup-header td") for (let item of groupHeaders) { |
Same probleme here, I used @csmaller code, and it worked for when I load the table, but when I make a sort or a filter, it goes back to the problem. My workaround was to get the emits for sort, filtering, rowschange... I got all of them, and made them all call the function addColspanToHeader() with a timeout to execute... Worked, but kind of messy... |
- Added Enraiged TableBuilder::{column,columExists}() methods - Added ability to define model for table action security assertions - Added ability to configure tables to order by sortable count - Added ability to define a horizontal rule before a form field - Added ability to define field disabledIf,disabledUnless conditions - Added ability to define field hiddenIf,hiddenUnless conditions - Add definition to the json template to process client-side - Or, add method call server-side to process in the form builder - Added 'daterange' type table filter - Added patch for correcting primevue import lines for ssr use - Added patch for issue with primevue datatables rowgroup colspan - primefaces/primevue#3685 - Added 'enraiged:fix-ssr' command to enable ssr with primevue - Corrected 419 error issue handling logout requests - Corrected issue handling field disabled attribute when provided - Corrected issue searching table columns with compound sources - Corrected various issues with the user password validation - Ensure table export options not displayed unless permitted - Improved table global actions processing - Removed neccessity of errors object in the js form system - Updated to the Laravel 10 framework - https://laravel.com/docs/10.x/releases
- Added Enraiged TableBuilder::{column,columExists}() methods - Added ability to define model for table action security assertions - Added ability to configure tables to order by sortable count - Added ability to define a horizontal rule before a form field - Added ability to define field disabledIf,disabledUnless conditions - Added ability to define field hiddenIf,hiddenUnless conditions - Add definition to the json template to process client-side - Or, add method call server-side to process in the form builder - Added 'daterange' type table filter - Added patch for correcting primevue import lines for ssr use - Added patch for issue with primevue datatables rowgroup colspan - primefaces/primevue#3685 - Added 'enraiged:fix-ssr' command to enable ssr with primevue - Corrected 419 error issue handling logout requests - Corrected issue handling field disabled attribute when provided - Corrected issue searching table columns with compound sources - Corrected various issues with the user password validation - Ensure table export options not displayed unless permitted - Improved table global actions processing - Removed neccessity of errors object in the js form system - Updated to the Laravel 10 framework - https://laravel.com/docs/10.x/releases
- Added Enraiged TableBuilder::{column,columExists}() methods - Added ability to define model for table action security assertions - Added ability to configure tables to order by sortable count - Added ability to define a horizontal rule before a form field - Added ability to define field disabledIf,disabledUnless conditions - Added ability to define field hiddenIf,hiddenUnless conditions - Add definition to the json template to process client-side - Or, add method call server-side to process in the form builder - Added 'daterange' type table filter - Added exim data reader for geo coords in uploaded images - Added patch for correcting primevue import lines for ssr use - Added patch for issue with primevue datatables rowgroup colspan - primefaces/primevue#3685 - Added 'enraiged:fix-ssr' command to enable ssr with primevue - Corrected 419 error issue handling logout requests - Corrected issue handling field disabled attribute when provided - Corrected issue searching table columns with compound sources - Corrected various issues with the user password validation - Ensure table export options not displayed unless permitted - Improved table global actions processing - Removed neccessity of errors object in the js form system - Updated to the Laravel 10 framework - https://laravel.com/docs/10.x/releases
…ow when table has selection column
3.34.1 still not working. steps: updated primevue in package.json to 3.34.1 cleared cache and opened in Incognito. Still broken |
I did not see your code, but are you grouping using a column rendered within the table? |
I included one of the data tables that is causing this problem. Could be a few variables that are causing this. maybe you can see the problem better than I... thanks
|
@csmaller Please try adding another column:
This won't render anyways, but will resolve the issue of the subheader spanning wrong number of columns (I think :D) |
It doesn't work. It makes empty space in the rest of row a little lower than before Edit: it works but not add it in the rest of row |
I know the issue is closed but kkurys made a nice suggestion. I'm using
I added an extra empty column and it helped. <template>
<DataTable>
<Column field="field1" header="field1"></Column>
<Column field="field1" header="field1"></Column>
<Column field="field2" header="field2"></Column>
<Column field="field3" header="field3"></Column>
<Column field="field4" header="field4"></Column>
<Column field="field5" header="field5"></Column>
<!-- Added this -->
<Column field="" header="" style="display: none;"></Column>
</DataTable>
</template> |
Was this fixed in 4.1? I can't seem to make this work. |
@philipimperato still not fixed but @deyanaaliyah answer #3685 (comment) works for now great. |
Describe the bug
When using selection column and row group headers, the colspan for the row group header doesn't count the select column so it doesn't span the full row.
Reproducer
https://codesandbox.io/s/modest-hamilton-q4v4nl
PrimeVue version
2.10.1
Vue version
2.x
Language
ALL
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
See code sandbox and inspect row group header. colspan is 3 when it should be 4.
Expected behavior
colspan for group headers should also include the selection column to span the full row.
The text was updated successfully, but these errors were encountered: