Give clickable table rows a pointer cursor automatically - #77
Open
methodofaction wants to merge 1 commit into
Open
Give clickable table rows a pointer cursor automatically#77methodofaction wants to merge 1 commit into
methodofaction wants to merge 1 commit into
Conversation
A body row that carries click wiring — onclick, the hx-* verbs, or Alpine's @click / x-on:click — now gets cursor: pointer from the table styles themselves, so consumers no longer have to remember to add it by hand. Rows whose listener is attached programmatically (no attribute to detect) opt in with data-clickable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Deploy Preview for popui-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clickable table rows now advertise themselves with
cursor: pointerautomatically — no more remembering to add it by hand (which kept biting us).The table styles detect click wiring from the attributes the supported stacks put on the row:
onclick(plain JS)hx-get/hx-post/hx-put/hx-patch/hx-delete(HTMX)@click/x-on:click(Alpine — escaped attribute selectors)data-clickable— explicit opt-in for rows whose listener is attached programmatically, where there's no attribute for CSS to seeScoped to
.popui-table-row-hover tbody tr, which everypopui.Tableapplies, so consumers get it for free. Plain rows keepcursor: auto.Docs
The "Clickable Rows" example previously told consumers to pass
[&_tr:hover_td]:cursor-pointervia the Class prop; it now demonstratesonclickrows and thedata-clickableopt-in instead.Verification
Checked computed styles in the docs site: rows with
onclick,data-clickable,hx-get,hx-delete,@click, andx-on:clickall computecursor: pointer; rows without any wiring stayauto.🤖 Generated with Claude Code