diff --git a/src/wuttaweb/grids/base.py b/src/wuttaweb/grids/base.py index 313dd67..82965ef 100644 --- a/src/wuttaweb/grids/base.py +++ b/src/wuttaweb/grids/base.py @@ -2604,9 +2604,10 @@ class GridAction: # pylint: disable=too-many-instance-attributes """ html = [ self.render_icon(), + HTML.literal(" "), self.render_label(), ] - return HTML.literal(" ").join(html) + return HTML.tag("span", c=html, style="white-space: nowrap;") def render_icon(self): """ diff --git a/tests/grids/test_base.py b/tests/grids/test_base.py index 4d9872d..b8334a6 100644 --- a/tests/grids/test_base.py +++ b/tests/grids/test_base.py @@ -2051,7 +2051,9 @@ class TestGridAction(TestCase): action, render_icon=lambda: "ICON", render_label=lambda: "LABEL" ): html = action.render_icon_and_label() - self.assertEqual("ICON LABEL", html) + self.assertTrue(html.startswith("