Dynamic sort on tables does not work - 3.0 NodeJS project

Wappler Version : Wappler 3.0.0
Operating System : Windows 10

Expected behaviour:

When you create a standard select DB query in a new NodeJS project and set up a Bootstrap table in app connect with sortable headers (as per Wappler documentation) you should be able to click on the headers and see the table sort dynamically.

Actual behaviour

What actually happens?

Nothing appears to happen at all when you click on the headers in the table. Checking in google console, you do see some activity though:
Also, this has been happening for all of 3.0 beta as far as i can remember.

How to reproduce

  • start a NodeJS app.
    -create a DB select query with the default sort/dir get parameters
    -set up query parameters in app connect with default sort/dir definitions
    -set the sort/dir paramaters in your server connect component in app connect
    -set the query manager and sort/dir parameters in the bootstrap table generator
    -try and sort the table headers.

Here’s some pics confirming its set up right in Wappler:

image

Did you select and add all columns in the query builder?

I’ve done it with a few queries, but I think in all of them I only was selecting a few specific columns (i.e. it wasn’t a Select * type query)

Hi Patrick, I have the same problem as Philip. I did a test in php and node.js using the same database, the same query and placing the fields one by one in the query. In php it worked perfectly as always, in node.js it didn’t work.

The sort only works when there are columns selected, it doesn’t work with *. It only allows sort on the columns that are selected.

1 Like

Yes then in my case it should work, but it doesn’t. I was not doing a select all query.

Good to know though in the future it won’t work on select all though.

Here’s an example of a simple query that is not working in NodeJS for dynamic sorting:

Just ran into this myself while working in a node sandbox.

Hey @patrick and @Teodor.

Just wanted to flag this again and see if this is on the checklist to be fixed soon? I know you guys aren’t releasing weekly updates at the moment with summer leave, but just wanted to see if this is on the list?

The NodeJS problems will be fixed after the summer break.

1 Like

I had the same problem. This fixed the issue for me.

What fixed the issue?

Selecting columns instead of .*, as @patrick mentioned in the post I replied to:

1 Like

Here a small update that should fix some sorting issues. Replace the file in lib/modules.

dbconnector.zip (1.1 KB)

Thanks @patrick this has worked so far.

Cheers!

This is fixed in Wappler 3.0.2

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.