-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
IntelliJ hightlight error while using functional components #433
Comments
@AlexITC .. What happens if you just use SharedItemApp(apis, appInfo) ? |
I am getting the same issue now with non-functional components. Weird. @AlexITC .. Is it working for you with normal components. And you definitely see Slinky injector in the Scala preferences ? |
I have a project using the non-functional components, and everything works as expected. |
I know they changed to scala 2.13 in Intellij 2020.3.x so we'll probably need a different build against scala2.13 before upgrading |
on intellij 2020.3 (Build #IC-203.5981.155), using Scala 2.13.4 and also and I get same highlighting errors as reported by @AlexITC. Also, here's a new one that took me quite a while to resolve!: import org.scalajs.dom.{Event, html}
import slinky.core.{SyntheticEvent}
import slinky.web.html.{input, onChange, value}
object TableColumnFilter {
case class Props(column: ColumnFilter)
val component = FunctionalComponent[Props] { props =>
val count = props.column.preFilteredRows.length
val onChangeValue = (e: SyntheticEvent[html.Input, Event]) => props.column.setFilter(e.target.value)
// the commented line is what Intellij "wants" me to write,
// the uncommented line is correct and what compiles
input(
value := props.column.filterValue,
// onChange := onChangeValue,
onChange := (onChangeValue(_)),
placeholder := s"Search ${count} records..."
)
}
} |
It should be simple to reproduce the issue, just open the
pwa
project from IntelliJ, then, open theMain
class, you should see errors on IntelliJ while they aren't:The text was updated successfully, but these errors were encountered: