Feature(s) impacted
Observed behavior
When i use collection.replaceFieldSorting('f', null)
the sorting is not disabled.
Instead it tells the agent to emulate sorting for that column.
Either the documentation or behavior is wrong
Expected behavior
documentation to match behavior
Failure Logs
none
Context
- Project name: roundtable
- Team name: operations
- Environment name: all
- Agent (forest package) name & version: latest agent nodejs
- Database type: postgres
- Recent changes made on your end if any: none relevant
Hello @Romain_Gilliotte
Indeed the documentation and function are not behaving as expected, we’re releasing a fix as well as updating the documentation to offer a proper disableFieldSorting
function.
I’ll get back to you once the fix is released.
Best regards,
1 Like
The documentation has been updated and you should be able to use the new function with the latest version of @forestadmin/agent
thanks @dogan.ay and @morganperre !
Adding this new method is clearer and makes the API better.
However, it creates an inconsistency with the other customizations
1 Like
Thanks @Romain_Gilliotte !
You are more than right about this consistency issue.
Let’s revamp this to add a proper simple API to handle those, it should look like this:
- Disabling operators →
disableFieldOperator(name, operator)
- Making a field read-only →
disableFieldWriting(name)
We will get back to you once done.
Kind regards @Romain_Gilliotte,
Morgan
1 Like