Provide next + previous URL's for the s-table web component

Describe the feature you’d like

Currently, the <s-table> web component only supports listening to the nextpage and previouspage events. However, being able to provide a nextPageUrl and previousPageUrl helps using the <s-table> web component for server-side apps.

The current approach makes more sense for React apps.

Describe alternatives you’ve considered

We’re currently using the <s-table> web component in a Ruby on Rails app. We have created a simple StimulusJS controller to handle the above behavior for us. However, it feels like this should be supported out of the box.

Another option might be to add a new component <s-table-navigation> with a <s-table-next-button> and a <s-table-previous-button>, so anyone can define themselves when to render the navigation and when not.

This reduces the public and responsibility API of the <s-table>.

Additional context

Add any other context about the feature request here.

1 Like