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

Add Access to Table's Current Focus #5089

Open
2 tasks done
groboclown opened this issue Aug 24, 2024 · 1 comment
Open
2 tasks done

Add Access to Table's Current Focus #5089

groboclown opened this issue Aug 24, 2024 · 1 comment

Comments

@groboclown
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

The Table widget keeps track of the current focus location, which helps with keyboard navigation. The Table keeps track of this separate from the Selected information.

By adding access to Current Focus, both reading it and a callback for when it updates, the cells can render whole row effects. For example, highlighting the row for very wide tables which otherwise would be difficult to visually distinguish.

Is it possible to construct a solution with the existing API?

No. The table stores this data as a private member, and Go prohibits access to it. The ScrollTo like functions allow limited access to write to the member, but there exists no way to read it.

Describe the solution you'd like to see.

I would like to see the Table structure to provide read access, and a callback function to signal when the value changes.

@groboclown groboclown changed the title Add Table Access to Current Focus Add Access to Table's Current Focus Aug 24, 2024
@andydotxyz
Copy link
Member

If the purpose is to highlight rows to follow focus then wouldn't this be better done internally to the table instead of with new APIs?

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