javascript - ui-material rating 不要点击值
问题描述
点击带有数值的星星的 onChange 方法不起作用。在我的例子中是 4。为什么?我怎样才能改变它? https://material-ui.com/components/rating/
<Rating
name="hover-tooltip"
value={4}
precision={0.5}
IconContainerComponent={IconContainer}
onChange={(event, newValue) => {
console.log(444) // when click on star number four this method don't work
// this.setState({value: newValue})
// this.props.onRating(newValue);
}}
disabled={false}
/>
解决方案
推荐阅读
- c# - 如何使图片框沿屏幕边缘移动而不剪裁?
- wordpress - 使用 WordPress Gutenberg 块中的(开始和结束索引)范围持续应用格式
- vb.net - 如何使用 For Each 循环将一组控件连续实例化到我的表单上?
- php - 如何将数据库查询构建器转换为 Eloquent 模型
- graphql - 来自结构化对象的 Typeorm 动态查询构建器
- excel-formula - 寻找变量变化的值
- jquery - 在与 v-for @click 方法不同的 vue 组件中调用函数
- c# - 在 PC 上找不到 monodevelop
- clojure - 找不到 clojure/data/json:如何让我的 REPL 看到这个(和类似的)依赖项
- java - AsyncTask 的结果未发布到 Activity 的 TextView