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

Restore debounce example #132

Closed
armanbilge opened this issue Jan 14, 2023 · 2 comments · Fixed by #155
Closed

Restore debounce example #132

armanbilge opened this issue Jan 14, 2023 · 2 comments · Fixed by #155
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@armanbilge
Copy link
Owner

I had to disable it because event props are currently broken.

calico/docs/time.md

Lines 65 to 67 in 642b1b8

## Debounce
```scala

@armanbilge armanbilge added this to the v0.2.0 milestone Jan 14, 2023
@armanbilge armanbilge added the documentation Improvements or additions to documentation label Jan 14, 2023
@armanbilge
Copy link
Owner Author

Update: event props are no longer broken, but this example still is 😂

This code here:

calico/docs/time.md

Lines 92 to 94 in c915f47

input { self =>
onInput --> (_.evalMap(_ => self.value.get).through(emailCh.sendAll))
}

Is supposed to be using this apply:

def apply[M](mkModifier: E => M)(using M: Modifier[F, E, M]): Resource[F, E] =
build.toResource.flatTap(e => M.modify(mkModifier(e), e))

But it seems to be confused:

[error] -- [E007] Type Mismatch Error: /workspace/calico/sandbox/src/main/scala/calico/Sandbox.scala:49:12 
[error] 49 |            onInput --> (_.evalMap(_ => self.value.get).through(emailCh.sendAll))
[error]    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]    |Found:    calico.html.EventProp.PipeModifier[cats.effect.IO, org.scalajs.dom.Event]
[error]    |Required: Tuple

@armanbilge
Copy link
Owner Author

armanbilge commented Jan 21, 2023

Well, the good news is it seems to be working in Scala 3.3.0-RC1-bin-20230119-13b8d7d-NIGHTLY.

No, spoke too soon 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant