Files
chatwoot/app/javascript/dashboard/components
Sivin Varghese 7c2ca1a07e fix: Not using saved order_by when fetching conversation list (#11008)
# Pull Request Template

## Description

This PR fixes the issue where the saved `order_by` value for the
conversation list is not being applied. The feature was originally added
in PR https://github.com/chatwoot/chatwoot/pull/8237 but broke after
merging the Vue 3 migration PR
https://github.com/chatwoot/chatwoot/pull/10047

Fixes
https://linear.app/chatwoot/issue/CW-4110/not-using-the-saved-sort-order-by-option-from-ui-settings

**Cause of the Issue:**  
The previous implementation checked `orderBy` against the keys of the
sorting constants instead of their values. Since `orderBy` stores a
sorting value, this caused the condition to fail, leading to fallback to
the default sorting option.

**Solution:**  
The fix ensures that `orderBy` is validated against the values of the
sorting constants rather than the keys. This correctly applies the saved
sorting preference, while still falling back to the default if needed.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Loom video**

https://www.loom.com/share/ebe8a4d3f1c041c6862334dc3b6d43a3?sid=5167feb7-eb4a-4f2c-8211-662830ba946c




## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-03-03 14:22:27 +05:30
..
2024-08-05 14:02:16 +05:30
2024-10-02 00:36:30 -07:00
2025-01-15 17:13:03 +05:30
2024-08-05 14:02:16 +05:30
2024-10-02 00:36:30 -07:00
2024-08-05 14:02:16 +05:30
2024-10-02 00:36:30 -07:00
2024-08-05 14:02:16 +05:30