diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b38913..cc241e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,6 @@ All notable changes to wuttaweb will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## v0.20.3 (2025-01-14) - -### Fix - -- add `render_grid_tag()` as separate def block for index templates -- add `click_handler` attr for GridAction - ## v0.20.2 (2025-01-14) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 7798cb3..a7a756e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "WuttaWeb" -version = "0.20.3" +version = "0.20.2" description = "Web App for Wutta Framework" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}] diff --git a/src/wuttaweb/grids/base.py b/src/wuttaweb/grids/base.py index 33269f2..e65a22e 100644 --- a/src/wuttaweb/grids/base.py +++ b/src/wuttaweb/grids/base.py @@ -2284,16 +2284,6 @@ class GridAction: Optional ``target`` attribute for the ```` tag. - .. attribute:: click_handler - - Optional JS click handler for the action. This value will be - rendered as-is within the final grid template, hence the JS - string must be callable code. Note that ``props.row`` will be - available in the calling context, so a couple of examples: - - * ``deleteThisThing(props.row)`` - * ``$emit('do-something', props.row)`` - .. attribute:: icon Name of icon to be shown for the action link. @@ -2312,7 +2302,6 @@ class GridAction: label=None, url=None, target=None, - click_handler=None, icon=None, link_class=None, ): @@ -2322,7 +2311,6 @@ class GridAction: self.key = key self.url = url self.target = target - self.click_handler = click_handler self.label = label or self.app.make_title(key) self.icon = icon or key self.link_class = link_class or '' diff --git a/src/wuttaweb/templates/grids/vue_template.mako b/src/wuttaweb/templates/grids/vue_template.mako index ba548cb..ac0a2a9 100644 --- a/src/wuttaweb/templates/grids/vue_template.mako +++ b/src/wuttaweb/templates/grids/vue_template.mako @@ -183,9 +183,6 @@ % if action.target: target="${action.target}" % endif - % if action.click_handler: - @click.prevent="${action.click_handler}" - % endif class="${action.link_class}"> ${action.render_icon_and_label()} diff --git a/src/wuttaweb/templates/master/index.mako b/src/wuttaweb/templates/master/index.mako index fbc87a3..bf32c6f 100644 --- a/src/wuttaweb/templates/master/index.mako +++ b/src/wuttaweb/templates/master/index.mako @@ -8,14 +8,10 @@ <%def name="page_content()"> % if grid is not Undefined: - ${self.render_grid_tag()} + ${grid.render_vue_tag()} % endif -<%def name="render_grid_tag()"> - ${grid.render_vue_tag()} - - <%def name="render_vue_templates()"> ${parent.render_vue_templates()} ${self.render_vue_template_grid()}