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

Allow skipping a callback when reforming #2864

Merged
merged 4 commits into from Sep 14, 2022

Commits on Sep 12, 2022

  1. Allow skipping a callback when reforming

    This adds a method to the callback, similar to Rust's filter_map, which
    allows to reform a callback, but also suppress the emit in case
    the reform function returns `None`.
    ctron committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    fb6a666 View commit details
    Browse the repository at this point in the history
  2. Update packages/yew/src/callback.rs

    Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
    ctron and WorldSEnder committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    75fc583 View commit details
    Browse the repository at this point in the history
  3. Implement filter_reform for all Callback output types

    As suggested in the PR, this implements filter_reform for all output
    types of callbacks by mapping to `Option<OUT>`.
    ctron committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    291beaf View commit details
    Browse the repository at this point in the history
  4. Fix clippy error

    Although I believe that the code is more readable/understandable with
    an explicit map, I am not sure adding a clippy exception just for that
    is justified. So I applied the clippy suggestion.
    ctron committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    041e4bb View commit details
    Browse the repository at this point in the history