spring-data-jpa-datatables-sample icon indicating copy to clipboard operation
spring-data-jpa-datatables-sample copied to clipboard

Searching in column of reference table

Open tejprakashmittal opened this issue 2 years ago • 0 comments

public class Employee { @Id private int id; private String firstName;

@ManyToMany(cascade = CascadeType.ALL)
@JoinColumn(name = "id_office")
private Set<Office> office = new HashSet<>();

}

class Office {

@Id @GeneratedValue private int id;
private String city;

}

Considering above declaration of classes, how to implement Advance section of the given datatable example.

Advanced searchpanes section -

how to implement the following,

$('select#officeSelector').change(function() { var filter = ''; $('select#officeSelector option:selected').each(function() { filter += $(this).text() + "+"; }); filter = filter.substring(0, filter.length - 1); table.column(7).search(filter).draw(); });

tejprakashmittal avatar Apr 06 '23 09:04 tejprakashmittal