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

新建优先级时增加colorpicker #1

Merged
merged 6 commits into from
Nov 25, 2017
Merged

Conversation

wencaistorm
Copy link
Contributor

No description provided.

Copy link
Owner

@lxerxa lxerxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码格式调整了一下,另外焦点失去关闭颜色选择版,请再修改下。

@lxerxa
Copy link
Owner

lxerxa commented Nov 25, 2017

另外,react-color
onChange的api,可以用这个简化代码

@wencaistorm
Copy link
Contributor Author

onChange:

Pass a function to call every time the color is changed. Use this to store the color in the state of a parent component or to make other transformations.
Keep in mind this is called on drag events that can happen quite frequently. If you just need to get the color once use onChangeComplete.

onChangeComplete:

Pass a function to call once a color change is complete.

我的理解是,onChangeonChangeComplete 的区别在于,onChange 会在鼠标拖拽选取颜色时频繁触发,而拖拽结束完成颜色选取时只会触发一次 onChangeComplete 事件。

使用 onChangeComplete 的好处是节省性能,而通过 onChange 可以很直观的反映出选择过程中的颜色变化情况。

@lxerxa lxerxa merged commit 2b6ed15 into lxerxa:master Nov 25, 2017
@lxerxa
Copy link
Owner

lxerxa commented Nov 25, 2017

在header,body,footer上都添加了onclick,那如果直接在最外层Modal添加不可以?

@lxerxa
Copy link
Owner

lxerxa commented Nov 25, 2017

在submit时是从values(redux-form)里,但是没看到values值的改变,提交不会有问题?

@lxerxa lxerxa assigned lxerxa and wencaistorm and unassigned lxerxa Nov 25, 2017
lxerxa added a commit that referenced this pull request Jul 25, 2018
 myXDtfWgsELpcuWpK1LchM+keCUwY2XlvcxbkMEUb+QQFsH4KbpUtQDvZjFlKO3g
 SeLn5GdYa5hKMQhQW/owPluuPQnbp7AfOOcrrNywEc4lfi0Kf3Tt2OswxnWY9xpR
 cm2DDUzQihno6QCEcYYNEj8+r7X3qAbrcAZBoVBt9aUNadJo/2UKDgOewKwcQj2r
 nMyBNOp0nS/PEx4uaMEa7PzfWC2iHuOvGopdDRoQ2H9hdGa5Furuy8puHyiNotXY
 27SfxuNqFUIce3jG68hPW91dIYRel29UsHCoY5YG0U4ePTigS9K78J1mDruvuXU=
 =/1DJ
 -----END PGP SIGNATURE-----
 

Merge pull request #1 from wencaistorm/master
@Makecodeeasy Makecodeeasy mentioned this pull request Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants