Refactor combo box integration; streamline onAdd, onRemove, and onEdit parameters in render_combobox macro for improved functionality and readability
This commit is contained in:
parent
d3a9b6dbd5
commit
b182e30c43
3 changed files with 71 additions and 26 deletions
|
@ -24,9 +24,9 @@
|
|||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
ComboBoxWidget.initComboBox("{{ id }}", {
|
||||
{% if onAdd %}onAdd: {{ onAdd }},{% endif %}
|
||||
{% if onRemove %}onRemove: {{ onRemove }},{% endif %}
|
||||
{% if onEdit %}onEdit: {{ onEdit }}{% endif %}
|
||||
{% if onAdd %}onAdd: function(option) { {{ onAdd | safe }} },{% endif %}
|
||||
{% if onRemove %}onRemove: function(option) { {{ onRemove | safe }} },{% endif %}
|
||||
{% if onEdit %}onEdit: function(option) { {{ onEdit | safe }} }{% endif %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue