Skip to content

Commit

Permalink
Actualiza url autocomplete enlazados correctamente
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos9818 committed Nov 26, 2024
1 parent a916a28 commit cf421df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rup.select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1481,18 +1481,19 @@
}

const name = settings.inlineEdit?.auxSiblingFieldName ? settings.inlineEdit?.auxSiblingFieldName : settings.name;
var url = settings.url;

if ($form.length === 1) {
if ($.fn.getHDIV_STATE(undefined, $form) != '') {
settings.url += (settings.url.includes('?') ? '&' : '?') + '_MODIFY_HDIV_STATE_=' + $.fn.getHDIV_STATE(undefined, $form) + '&MODIFY_FORM_FIELD_NAME=' + name;
url += (settings.url.includes('?') ? '&' : '?') + '_MODIFY_HDIV_STATE_=' + $.fn.getHDIV_STATE(undefined, $form) + '&MODIFY_FORM_FIELD_NAME=' + name;
}

if (data && !settings.url.includes(data)) {
// Escapa los caracteres '#' para evitar problemas en la petición.
settings.url += (settings.url.includes('?') ? '&' : '?') + data.replaceAll('#', '%23');
url += (settings.url.includes('?') ? '&' : '?') + data.replaceAll('#', '%23');
}
}
return settings.url;
return url;
},
/**
* Método de inicialización del componente.
Expand Down

0 comments on commit cf421df

Please sign in to comment.