Initial value of datatable sorting dropdown is incorrect on mobile view #1963

matthiasv88 opened this Issue Dec 12, 2016 · 0 comments


None yet

2 participants


1) Environment

  • PrimeFaces version: 6.0
  • Does it work on the newest PrimeFaces version? No
  • Application server + version: Wildfly 10.1.0 Final
  • Affected browsers: All

2) Expected behavior

When the datatable is in normal mode, the default sorting is applied and visible in the table header. When switching to mobile view, the columns are replaced by one column and a dropdown is added for sorting. I expect the default value of the dropdown to be set to the column and sorting mode that is currently applied to the datatable.

3) Actual behavior

The sorting is still correct, but the selected dropdown value is set to the first value instead of the actual value and sorting mode currently applied.

4) Steps to reproduce

Load attached page and bean in normal view. Notice the default sorting is set correctly to lastname . Switch to mobile view. The dropdown is set to First name ascending, but the applied sorting is still last name. When you switch back to normal view the sorting is still lastname.

5) Sample XHTML

Attached file incorrectsorting.xhtml

6) Sample bean

Attached file and




@mertsincan mertsincan added a commit that closed this issue Dec 12, 2016
@mertsincan mertsincan Fixed #1963 bb6566a
@mertsincan mertsincan added this to the 6.1 milestone Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment