Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

clear icon is shown with value=undefined #139

Open
giogonzo opened this issue Nov 23, 2017 · 0 comments
Open

clear icon is shown with value=undefined #139

giogonzo opened this issue Nov 23, 2017 · 0 comments
Labels

Comments

@giogonzo
Copy link
Member

description

Not a big deal, but it seems that the logic to show/hide the clear icon is behaving differently after the first valid value is passed to a rendered DatePickerInput:

  • initial render with value=undefined -> no icon
  • subsequent renders with value=undefined, after value was set to a valid date at least once -> icon is shown

how to reproduce

using DatePickerInput statelessly with value, onChange and onClear props..

  • render DatePickerInput with value: undefined
  • update with value set to a valid date
  • click on clear icon (call onClear)
  • DatePickerInput is re-rendered with value: undefined, but the clear icon remains visible

specs

{optional: describe a possible fix for this defect, if not obvious}

misc

{optional: other useful info}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant