Nikola Milovic
12/18/2021, 12:55 PMvar renderCustomHeader: (Date, (Int) -> Unit, (Int) -> Unit,
() -> Unit, () -> Unit,
Boolean,
Boolean) -> ReactNode?
And I use it like so
attrs.renderCustomHeader = {
date,
changeYear,
changeMonth,
decreaseMonth,
increaseMonth,
prevMonthButtonDisabled,
nextMonthButtonDisabled,
->
div {
//other stuff
}
}
I tried using createElement, but then the changeYear, changeMonth
aren't usable
Uncaught TypeError: this._$changeMonth is not a function
turansky
12/18/2021, 1:21 PMcreate
method to solve this problemturansky
12/18/2021, 1:22 PMNikola Milovic
12/18/2021, 1:41 PMdiv
like in your example you create TextField
but there doesn't seem to be anything like it.turansky
12/18/2021, 1:57 PMpre.280
required and valid importNikola Milovic
12/18/2021, 2:05 PMNikola Milovic
12/18/2021, 2:15 PMturansky
12/18/2021, 3:44 PMNikola Milovic
12/19/2021, 8:10 AM@JsName("MenuIcon")
external val menuIcon: ComponentClass<IconProps>
Gives me Unresolved reference: ComponentClass
on compile time, all the references are resolved in the IDE
Ton of these
Unresolved reference: react
turansky
12/19/2021, 9:25 AMturansky
12/19/2021, 9:26 AMNikola Milovic
12/19/2021, 9:28 AMturansky
12/19/2021, 9:33 AMMenuIcon
in your caseNikola Milovic
12/19/2021, 9:34 AMturansky
12/19/2021, 9:35 AMturansky
12/19/2021, 9:36 AMNikola Milovic
12/19/2021, 9:37 AMNikola Milovic
12/19/2021, 9:38 AMturansky
12/19/2021, 9:39 AMpre.280
?Nikola Milovic
12/19/2021, 9:40 AM"0.0.1-pre.280-kotlin-1.6.0"
Adding this in my root buildsrc
allprojects {
repositories {
google()
mavenCentral()
mavenLocal()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
}
plugins.apply("com.github.ben-manes.versions")
tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask> {
args += "--ignore-scripts"
}
configurations.all {
resolutionStrategy {
eachDependency {
if (requested.group == "org.jetbrains.kotlin" && requested.name.startsWith("kotlin-"))
useVersion(Versions.kotlin)
}
}
}
}
turansky
12/19/2021, 9:42 AMNikola Milovic
12/19/2021, 9:42 AMNikola Milovic
12/19/2021, 9:49 AMpre.262 (i belive)
and fulfill this kind of signature?
renderCustomHeader?(params: ReactDatePickerCustomHeaderProps): React.ReactNode;
In Kotlin
var renderCustomHeader: (Date, (Int) -> Unit, (Int) -> Unit,
() -> Unit, () -> Unit,
Boolean,
Boolean) -> ReactNode?
And something like this
attrs.renderCustomHeader = {
date,
changeYear,
changeMonth,
decreaseMonth,
increaseMonth,
prevMonthButtonDisabled,
nextMonthButtonDisabled,
->
div {
//other stuff
}
}
turansky
12/19/2021, 9:57 AMNikola Milovic
12/19/2021, 10:32 AM