Skip to content

Commit a214d5b

Browse files
fix: allow order array to be empty
The "order" attribute can be empty in two cases: - when setting "ordering: false" Reference: https://datatables.net/reference/option/ordering Related: #107 - with DataTabbles 2.0 > Columns can now have three ordering states - asc, desc or data index order (specified by an empty string). The columns.orderSequence option has been updated to make use of this, so the third ordering on a column will now take it back to the index order, rather than returning to the first direction. Reference: https://cdn.datatables.net/2.0.0/ Related: #156
1 parent e83b4d5 commit a214d5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/springframework/data/jpa/datatables/mapping/DataTablesInput.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
import java.util.regex.Matcher;
1010
import java.util.regex.Pattern;
1111

12+
/**
13+
* The format of the payload sent by the client.
14+
*
15+
* @see <a href="https://datatables.net/manual/server-side#Sent-parameters">datatables.net reference</a>
16+
*/
1217
@Data
1318
public class DataTablesInput {
1419
/**
@@ -55,7 +60,6 @@ public class DataTablesInput {
5560
/**
5661
* Order parameter
5762
*/
58-
@NotEmpty
5963
private List<Order> order = new ArrayList<>();
6064

6165
/**

0 commit comments

Comments
 (0)