Fix custom cell click handlers in main buefy grid tables
just used for editing catalog/invoice cost in receiving thus far..
This commit is contained in:
parent
f2915afda4
commit
845b5cda1a
3 changed files with 22 additions and 10 deletions
|
@ -180,18 +180,21 @@
|
|||
% endif
|
||||
|
||||
:checkable="checkable"
|
||||
|
||||
% if grid.checkboxes:
|
||||
:checked-rows.sync="checkedRows"
|
||||
% if grid.clicking_row_checks_box:
|
||||
@click="rowClick"
|
||||
% endif
|
||||
% endif
|
||||
|
||||
% if grid.check_handler:
|
||||
@check="${grid.check_handler}"
|
||||
% endif
|
||||
% if grid.check_all_handler:
|
||||
@check-all="${grid.check_all_handler}"
|
||||
% endif
|
||||
|
||||
% if isinstance(grid.checkable, str):
|
||||
:is-row-checkable="${grid.row_checkable}"
|
||||
% elif grid.checkable:
|
||||
|
@ -204,6 +207,10 @@
|
|||
@sort="onSort"
|
||||
% endif
|
||||
|
||||
% if grid.click_handlers:
|
||||
@cellclick="cellClick"
|
||||
% endif
|
||||
|
||||
:paginated="paginated"
|
||||
:per-page="perPage"
|
||||
:current-page="currentPage"
|
||||
|
@ -227,9 +234,6 @@
|
|||
searchable
|
||||
% endif
|
||||
cell-class="c_${column['field']}"
|
||||
% if grid.has_click_handler(column['field']):
|
||||
@click.native="${grid.click_handlers[column['field']]}"
|
||||
% endif
|
||||
:visible="${json.dumps(column['visible'])}">
|
||||
% if column['field'] in grid.raw_renderers:
|
||||
${grid.raw_renderers[column['field']]()}
|
||||
|
@ -392,6 +396,16 @@
|
|||
|
||||
methods: {
|
||||
|
||||
% if grid.click_handlers:
|
||||
cellClick(row, column, rowIndex, columnIndex) {
|
||||
% for key in grid.click_handlers:
|
||||
if (column._props.field == '${key}') {
|
||||
${grid.click_handlers[key]}(row)
|
||||
}
|
||||
% endfor
|
||||
},
|
||||
% endif
|
||||
|
||||
copyDirectLink() {
|
||||
|
||||
if (navigator.clipboard) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue