Script to filter item_name in quotation based on item_group i.e. added

Friends, Needing support to point right script . Based on the study here, I want to set filter stock items as we added item-group in the quotation child table. There are huge stock items so we want to select group and then based on group selection want to select stock items. I have tried many but this is the most relevant script, I am trying. Thanks in advance

frappe.ui.form.on ("Quotation Item", {
       item_group: function(frm) {
            cur_frm.get_query("item_name", function() {
               return {
                   "filters": {
                       "item_name": frm.doc.item_group
                   }
               };
           });
       }
    });