Hide row from list

i am using this script to hide rows current user does not have an assignment to.

frappe.listview_settings[‘Issue’] = {
onload: function(listview) {
// Refresh the list view to ensure that the data is loaded

// Wait for the data to load and loop through each row in the list
setTimeout(function() {
  listview.data.forEach(function(row) {
    var assigned_to = row._assign;

    // Check if the assigned_to field is not null and the current user is assigned to the row
    if (assigned_to && assigned_to.includes(frappe.session.user)) {
      // If the user is assigned to the row, show the row
    } else {
      // If the user is not assigned to the row or the assigned_to field is null, hide the row
}, 1000);


it did not work .
row.show(); i think here is the problem …
any help please

This is the script i’m able to hide a user from list view

frappe.listview_settings['User'] = frappe.listview_settings['User'] || {};

frappe.listview_settings['User'] = {
    refresh: function(listview) {
    onload: function(listview) {

function hide_user(){
    setTimeout(function() {
    }, 10);

Thank You!