干预由于目标被视为被动,因此无法防止被动事件侦听器中出现默认值

时间:2018-11-20 06:05:30

标签: reactjs material-ui datetimepicker timepicker

我正在尝试集成material-ui timepicker

这是代码

handleChange(time) {
  console.log(time)
}

<TimeInput
  mode='12h'
  value={new Date(moment(fromTime, 'hh:mm a'))}
  onChange={(time) => this.handleChange(time)}
/>

但是当我尝试更改时间时,收到此警告

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.

请帮助!!!

1 个答案:

答案 0 :(得分:1)

您可以在组件容器div触摸操作上使用css属性:无

> cl <- makeCluster(num_cores)
> results <- parLapply(cl = cl, seq(1:10), function(i, df, traits){
+     row = df[i,]
+     traits2 = traits
+     ModString = "vector ~ traits$factor1"
+     return(list(traits2, row, ModString))
+ }, df = df, traits = traits)
> results
[[1]]
[[1]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[1]][[2]]
    sample1   sample2   sample3  sample4
1 0.6941108 0.8656177 0.9807334 0.936609

[[1]][[3]]
[1] "vector ~ traits$factor1"


[[2]]
[[2]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[2]][[2]]
    sample1   sample2   sample3   sample4
2 0.1007983 0.5599374 0.0208095 0.8082196

[[2]][[3]]
[1] "vector ~ traits$factor1"


[[3]]
[[3]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[3]][[2]]
    sample1   sample2  sample3   sample4
3 0.9633059 0.7564143 0.913617 0.4179525

[[3]][[3]]
[1] "vector ~ traits$factor1"


[[4]]
[[4]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[4]][[2]]
     sample1  sample2  sample3   sample4
4 0.06625104 0.390351 0.511572 0.8386714

[[4]][[3]]
[1] "vector ~ traits$factor1"


[[5]]
[[5]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[5]][[2]]
    sample1   sample2    sample3  sample4
5 0.6135228 0.4926991 0.08513074 0.105647

[[5]][[3]]
[1] "vector ~ traits$factor1"


[[6]]
[[6]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[6]][[2]]
    sample1   sample2   sample3   sample4
6 0.7121677 0.6554129 0.6409468 0.4906039

[[6]][[3]]
[1] "vector ~ traits$factor1"


[[7]]
[[7]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[7]][[2]]
    sample1  sample2   sample3   sample4
7 0.4651641 0.546514 0.4039608 0.1758802

[[7]][[3]]
[1] "vector ~ traits$factor1"


[[8]]
[[8]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[8]][[2]]
    sample1   sample2   sample3   sample4
8 0.5121237 0.4950444 0.9662431 0.6851582

[[8]][[3]]
[1] "vector ~ traits$factor1"


[[9]]
[[9]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[9]][[2]]
    sample1  sample2   sample3   sample4
9 0.2486208 0.135422 0.2128657 0.7332921

[[9]][[3]]
[1] "vector ~ traits$factor1"


[[10]]
[[10]][[1]]
          var1
sample1 group1
sample2 group1
sample3 group2
sample4 group2

[[10]][[2]]
      sample1   sample2   sample3   sample4
10 0.06203028 0.7916495 0.3528376 0.2259685

[[10]][[3]]
[1] "vector ~ traits$factor1"