Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 985 Rev 986
Línea 66... Línea 66...
66
    params.set('page', '1')
66
    params.set('page', '1')
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 = {}) => {
-
 
71
    const urlParams = new URLSearchParams(search)
70
  const onChangeAddress = (address = {}) => {
72
    urlParams.set('page', '1')
71
    params.set('page', '1')
Línea -... Línea 72...
-
 
72
    const addressEntries = Object.entries(address)
73
    const addressEntries = Object.entries(address)
73
 
74
 
74
    console.log(params)
75
    urlParams.forEach((value, key) => {
75
    params.forEach((value, key) => {
76
      console.log(key, value)
76
      console.log(key, value)
Línea 77... Línea 77...
77
      if (!['page', 'keyword'].includes(key)) urlParams.delete(key)
77
      if (!['page', 'keyword'].includes(key)) params.delete(key)
Línea 78... Línea 78...
78
    })
78
    })
79
 
79
 
Línea 80... Línea 80...
80
    addressEntries.forEach(([key, value]) => value && urlParams.set(key, value))
80
    addressEntries.forEach(([key, value]) => value && params.set(key, value))
81
 
81
 
82
    history.replace(`${pathname}?${urlParams.toString()}`)
82
    history.replace(`${pathname}?${params.toString()}`)