Skip to content

[paginationStore] Add onChange callback #36

Open
@techniq

Description

@techniq

While you can use a changeStore to accomplish the task of calling a function when you change page/etc, being able to provide a paginationStore({ onChange: () => ... }) would simplify this case.

Adding something like...

if (props?.onChange) {
  state.subscribe(props.onChange)
}

...to paginationStore should work.

See discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions