Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 981 | Rev 983 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 981 Rev 982
Línea 67... Línea 67...
67
    history.replace(`/search/entity/${newCategory}?${params.toString()}`)
67
    history.replace(`/search/entity/${newCategory}?${params.toString()}`)
68
  }
68
  }
Línea 69... Línea 69...
69
 
69
 
70
  const onChangeAddress = (address = {}) => {
70
  const onChangeAddress = (address = {}) => {
71
    params.set('page', '1')
71
    params.set('page', '1')
-
 
72
    const addressEntries = Object.entries(address)
-
 
73
 
-
 
74
    if (!addressEntries.length) {
-
 
75
      params.forEach((value, key) => {
-
 
76
        if (key !== 'page' || key !== 'keyword') params.delete(key)
-
 
77
      })
72
    Object.entries(address).forEach(
78
    } else {
73
      ([key, value]) => value && params.set(key, value)
79
      addressEntries.forEach(([key, value]) => value && params.set(key, value))
-
 
80
    }
74
    )
81
 
75
    history.replace(`${pathname}?${params.toString()}`)
82
    history.replace(`${pathname}?${params.toString()}`)
Línea 76... Línea 83...
76
  }
83
  }
77
 
84