Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable clicking on row linking to the show page #491

Open
willus10245 opened this issue Mar 30, 2023 · 1 comment
Open

Enable clicking on row linking to the show page #491

willus10245 opened this issue Mar 30, 2023 · 1 comment

Comments

@willus10245
Copy link

A common UX with tables is to have clicking anywhere on the row take you to the show page for that item. It would be great if this could be added as an option to exzeitable.

Describe the solution you'd like
One option could be another configuration option when calling use Exzeitable.
For instance,

 use Exzeitable,
    repo: MyApp.Repo,
    routes: Routes,
    path: :user_show_path,
    action_buttons: [:edit],
    row_click_action: [:show], # new field to give an action for clicking on the row
    per_page: 20,
    disable_hide: true,
    query: from(u in User),
    pagination: [:bottom],
    fields: [
      first_name: [],
      last_name: [],
      type: [function: true]
    ],

    # Optional
    debounce: 300

Additional context
n/a

@alanvardy
Copy link
Owner

I think that adding this as an option is a great idea! I don't know if I have time to implement this in the short term however. Are you interested in opening up a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants