Skip to content

Conversation

@ToxicMushroom
Copy link

@ToxicMushroom ToxicMushroom commented Dec 24, 2025

Lays groundwork for adding features like column hiding and column ordering as envisioned in #58 via a generated enum.

Enum generation and switching between current usize and the enum is handled in Synphonyte/leptos-struct-table-macro#13.

This currently serves as a progress tracker and place to give preliminary feedback.

  • tests
  • example
  • docs
  • implementation

@maccesch
Copy link
Collaborator

Looking good so far 👍🏼

@ToxicMushroom
Copy link
Author

Is the example + small docs-tests is enough testing material ?

@ToxicMushroom ToxicMushroom marked this pull request as ready for review December 29, 2025 09:11
Copy link
Collaborator

@maccesch maccesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing and docs are very well taken care of, thank you!

// Event handler callback when this row is selected
on_select: EventHandler<web_sys::MouseEvent>,
// Phantom data needs the column index type (a generated enum in this example)
_phantom: PhantomData<BookColumn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the component isn't generic, this shouldn't be necessary.

I think instead of adding the PhantomData to the renderer function's signature we should add it as a field to the generated struct in the macro renderer_fn!.

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.

2 participants