Column: Automatic sort if groupRow is set
See original GitHub issueDescribe the defect When having a column that has the property “groupRow” set to “true” and the “sortBy” property is set then this column is automatically sorted.
Environment:
- PF Version: 11.0.1
- JSF + version: JSF 2.3
- Affected browsers: Firefox and Chrome
Expected behavior A column where “sortOrder” is not set should not be sorted by default. At the example below the column is sorted automatically.
Example XHTML
<h:form>
<p:dataTable value="#{groupRow.data}" var="data">
<p:column sortBy="#{data}" filterBy="#{data}" groupRow="true">
<h:outputText value="#{data}" />
</p:column>
</p:dataTable>
</h:form>
Example Bean
@Named
@ViewScoped
public class GroupRow implements Serializable {
private static final long serialVersionUID = 4485167715842515932L;
private List<Integer> data = null;
public List<Integer> getData() {
if (data == null) {
data = new ArrayList<>();
for (int i = 10; i >= 1; i--)
data.add(i);
}
return data;
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Automatically sort rows when entering data in specific column
If you want to sort a custom list in excel, you might try below steps: 1. Select the columns to sort. 2. In...
Read more >How to group rows in Excel to collapse and expand them
I have a sorted column and want to create a group whenever the value value in the column changes. I get a 'Cannot...
Read more >Grouping by Row: Core Feature of our Datagrid - AG Grid
Row Grouping. This page shows how to group your rows. It starts off with Auto Column Groups, the simplest way to configure row...
Read more >Excel Grouping (Rows and Columns) | How to Group in Excel
Have you ever wanted to know how to make sense of complicated Excel data? In this video, I'm going to show you the...
Read more >Tutorial: Sort Group Rows by Summary Values
By default, group rows are automatically sorted in alphabetical order where ... To remove group row sorting, right-click the Category column ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@halisyilboga please open a new issue which includes a reproducer and references this issue.
Aslinda grup satir yapmak ile sort yapmak arasinda fark var. Grup satirlamanin siralama olmadanda calisabilmesi gerekmektedir. We add newly added rows at the top of the table and this feature broke that. Also we make inplace edit and automatik sorting is also broke that feature. Last but not least default sorted column seems ugly and irritating. We can get the order from db or backend why I soppose to sort in filter. When I investigate SordOrder Enum I saw that it has a propertyv UNSORTED. But this feature is also does not work correct with grouprowing. This is definetly a bug.