Filter User based on User Role

Hi, can someone help me to filter user name based on user role? The below doesn’t work.

 frappe.ui.form.on("BT Request", "onload", function (frm, cdt, cdn) {
     frm.set_query("exp_approver", function () {
 		filters: [["UserRole", "role", "=", "Leave Approver"]]

I have custom doc type with field exp_approver and option User. But this gives me all users and I would like to list only users from a group. Thank you.

You may have to use get_query and write a server side method to return the data, some examples can be found in lead.js file.