diff --git a/datasette/static/app.css b/datasette/static/app.css index 034d355f43..206ef561da 100644 --- a/datasette/static/app.css +++ b/datasette/static/app.css @@ -418,6 +418,7 @@ button.button-as-link { display: block; padding: 4px 8px 2px 8px; color: #222; + white-space: nowrap; } .dropdown-menu a:hover { background-color: #eee; diff --git a/datasette/static/table.js b/datasette/static/table.js index ffa5e25480..db201ecc76 100644 --- a/datasette/static/table.js +++ b/datasette/static/table.js @@ -4,6 +4,7 @@ var DROPDOWN_HTML = ``; @@ -41,6 +42,11 @@ var DROPDOWN_ICON_SVG = ` el.innerText.trim() == '').length + ) { + notBlank.style.display = 'block'; + notBlank.setAttribute('href', notBlankUrl(column)); + } else { + notBlank.style.display = 'none'; + } menu.style.position = 'absolute'; menu.style.top = (menuTop + 6) + 'px'; menu.style.left = menuLeft + 'px'; - menu.style.display = 'block'; + menu.style.display = 'inline-flex'; } var svg = document.createElement('div'); svg.innerHTML = DROPDOWN_ICON_SVG;