Topic: Unclear how to make clickable rows in datatable
                  
                  jasonh
                  priority
                  asked 3 years ago
                
Expected behavior Make rows clickable in datatable
Actual behavior Can't understand how it's working based on the documentation
I don't want checkboxes, I just want to click a row and have it highlight the row and trigger some code to happen. Is there some better documentation or example?
Resources (screenshots, code snippets etc.)
                      
                      jasonh
                      priority
                        answered 3 years ago
                    
I ended up adding (click)="myFunction()" to the <tr> and it's working - I guess the row is clickable by default. Although still not clear how the ones from the documentation are working.
Michał Duszak staff commented 3 years ago
It works exactly this way. You can make use (click) event to perform some code upon a row click. In the live preview demo from the documentation it triggers a modal.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Priority
 - Premium support: Yes
 - Technology: MDB Angular
 - MDB Version: MDB5 2.3.0
 - Device: PC
 - Browser: Chrome
 - OS: Windows 11
 - Provided sample code: No
 - Provided link: Yes