question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

colspan for noDataFound case is not calculated properly with custom action

See original GitHub issue

When action’s add, edit, delete are all set to false and action’s custom is added, empty table does not set colspan property properly (colspan value is one less than it’s supposed to be). I have a solution here below.

https://github.com/akveo/ng2-smart-table/blob/8f37d374a87a9008328aaea36ad6ce78a28ce7a8/src/ng2-smart-table/components/tbody/tbody.component.ts#L50

this.isActionDelete = this.grid.getSetting('actions.delete');
+ this.isActionCustom = !!this.grid.getSetting('actions.custom');

https://github.com/akveo/ng2-smart-table/blob/8f37d374a87a9008328aaea36ad6ce78a28ce7a8/src/ng2-smart-table/components/tbody/tbody.component.html#L53

- <td [attr.colspan]="grid.getColumns().length + (isActionAdd || isActionEdit || isActionDelete)">
+ <td [attr.colspan]="grid.getColumns().length + (isActionAdd || isActionEdit || isActionDelete || isActionCustom)">

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
chknimcommented, Dec 2, 2017
0reactions
mouazAlkhodaricommented, Mar 3, 2022

@chknim i have made new PR that do the same thing mentioned here you can find it here #1307 i hope it could be merged asap

Read more comments on GitHub >

github_iconTop Results From Across the Web

DataTables - Not working when added colspan for the last ...
If you use a colspan, dataTable won't understand the columns count / calculation, returning undefined and throwing an error in that case.
Read more >
jQuery DataTables: COLSPAN in table body TBODY
The problem with COLSPAN attribute is that jQuery DataTables requires one TD element for each cell in table body.
Read more >
Code / IDS Enterprise / 4.58.1 / Datagrid - Infor Design
Name Type Description element (Array | HTMLElement) The component element. settings object? The component settings. settings.showHoverState boolean=true If false there will be no hover effect.
Read more >
NASIS CVIR Language Manual
“NASIS CVIR Language Manual, Scripting language for NASIS Calculations, ... but the interpreter is not case sensitive for keywords or variable names.
Read more >
Untitled
Wkef tv news anchors, Wonka bar iphone 6 case, La mijloc de codru rezumat, ... Asset management company logo, Bootstrap table colspan not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found