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

editor: fix ToggleSwitch & DatePicker #235

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

zannkukai
Copy link
Contributor

  • Fixes ToggleSwitch behavior when the wrapper is associated to a simple
    field.
  • Fixes DatePicker behavior when the field value is reset.

Co-Authored-by: Renaud Michotte renaud.michotte@gmail.com
Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai self-assigned this Aug 6, 2020
@zannkukai zannkukai marked this pull request as ready for review August 6, 2020 07:44
Copy link

@AoNoOokami AoNoOokami left a comment

Choose a reason for hiding this comment

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

I think Igor would say something about the commit message and would suggest a better version to explain why you did that work. But I'm not as good as him. However, I still can propose this for the message commit tile: editor: fix ToggleSwitch & DatePicker.
:)

At this time, the DatePicker component reset function doesn't work as
expected. When the reset() function is called, the value is set to
1970-01-01 (zero epoch timestamp) instead to set an empty string into
the field. This commit fixes this wrong behavior.

This commit also fixes a problem from the ToggleSwitch component. The
toggle switch was not correctly initialized if it is related to a simple
component (<> Array <> Object)

Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@zannkukai zannkukai force-pushed the zan-toggle-wrapper-fix branch from 0d3918b to 4f0a0c6 Compare August 7, 2020 15:39
@zannkukai zannkukai requested a review from AoNoOokami August 7, 2020 15:41
@iGormilhit iGormilhit changed the title EditorComponent: fix ToggleSwitch & DatePicker. editor: fix ToggleSwitch & DatePicker Aug 10, 2020
@zannkukai zannkukai merged commit 27e27d7 into rero:dev Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants