Skip to content

Commit

Permalink
fix: allow order array to be empty
Browse files Browse the repository at this point in the history
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
  • Loading branch information
darrachequesne committed Mar 3, 2024
1 parent e83b4d5 commit a214d5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* The format of the payload sent by the client.
*
* @see <a href="https://datatables.net/manual/server-side#Sent-parameters">datatables.net reference</a>
*/
@Data
public class DataTablesInput {
/**
Expand Down Expand Up @@ -55,7 +60,6 @@ public class DataTablesInput {
/**
* Order parameter
*/
@NotEmpty
private List<Order> order = new ArrayList<>();

/**
Expand Down

0 comments on commit a214d5b

Please sign in to comment.