Wappler Version : 3.7.2
Operating System : Mac OS 10.15.6
Server Model: PHP
Database Type: MySQL
Hosting Type: Custom Hosting (AMPPS)
Expected behavior
What do you think should happen?
Sorting should work when turning on Sortable Headers of a Table whether the cell text or inner text has formatting or not.
Actual behavior
What actually happens?
If a table cell text or inner text has formatting before Sortable Headers is turned on that cell won’t sort due to javascript errors caused by incorrect syntax in the cell header’s dynamic attributes and dynamic events.
If you add the formatting after Sortable Headers is turned on, it works fine.
How to reproduce
- Detail a step by step guide to reproduce the issue
- A screenshot or short video indicating the problem
- A copy of your code would help. Include: JS, HTML.
- Test your steps on a clean page to see if you still have an issue
-
Create a table using the bootstrap 4 table generator.
-
Add formatting to a cell or cells.
-
Turn on “Sortable Headers” for the table.
-
Click on the header to sort the column(s) with the formatting and it won’t do anything.
-
View the errors in Wappler.
-
When you edit the Dynamic Attributes they don’t appear to be escaped properly.
-
If you try to edit the Dynamic Event you get another error which I assume is due to it not being escaped properly as well.
-
If you do an append like vehicle_year+’ ‘+vehicle_make+’ '+vehicle_model before turning on Sortable Headers, it will cause errors as well.
-
You can turn off Sortable Headers, remove all formatting from the cells, turn on Sortable Headers and then put back the formatting on the cells and it works properly.