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

Optional hover menu and mouseover events #326

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

adunndevster2
Copy link

@adunndevster2 adunndevster2 commented Aug 31, 2023

Type

It lets the user optionally create a slot that appears on hover over a row. This is super useful for user experiences where you'd like a menu of options to appear on the row if you hover over it. Very common case, as google and many others use it all the time. It also gives the user the option to listen to a "hover" event if they'd like.

We need this for our product! Thank you for this table, it rocks.

Put an x in the boxes that apply_

  • Fix
  • Feature

Checklist

Put an x in the boxes that apply._

  • Title as described
  • Add unit test by vitest if necessary

DEMO

Screen.Recording.2023-08-31.at.4.32.22.PM.mov

USAGE:

  1. just add hover-row-to-show-element to your DataTable
  2. make use of the slot like so:
<template #hover="item">
  <div style="padding: 10px 0px 0px 15px;">
    This might show menu options or something for {{ item.name }}...
  </div>
</template>

@adunndevster2
Copy link
Author

@HC200ok - I hope this helps the project! Let me know what you think. It's something we definitely need, for sure!

@adunndevster2
Copy link
Author

@HC200ok I've made some more improvements to this, and we are using it in our production site now. (I had to make a new npm package temporarily until/if this is merged in). Do you think you might be able to take a look at it?

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

Successfully merging this pull request may close these issues.

1 participant