Calcite-components: calcite-date triggers calciteDateChange event unexpectedly

Created on 11 Jul 2020  Â·  13Comments  Â·  Source: Esri/calcite-components

Programmatically changing the date value provided to the calcite-date element causes calciteDateChange to be fired. This seems to be a bug and the event should only fire when a user interacts with the date picker UI.

3 - installed bug

All 13 comments

@codylawson fix for this should be in the latest release.

@paulcpederson Awesome! Thanks for resolving this.

@paulcpederson This seems to have been reverted in the latest release. We're now getting update events from the date picker when the value is changed programatically.

@jcfranco was there something weird with the last release? I don't see any changes in this file that would have impacted this regression?

I don't think think so, at least the most recent commit. All tests were passing. Do you have a repro case? We could use it to git bisect the culprit and maybe add another test.

@jcfranco I'll work on a repro case for you. We did revert to beta 42 and are no longer seeing the issue, so it seems something happened in the last two releases.

@jcfranco Could you give this a shot? https://codesandbox.io/s/cc-date-picker-2772j

Noticing I get two change events when setting the date via the date picker, and another one when I click the button. If you think there's a better way handle a controlled date picker let me know! Thanks

I think I'm missing something, but I see all of the events you describe with beta 40 – 44.

Sorry, I should have removed the reference from package.json, I'm using the library from unpkg. Here's two forks with beta.42 and beta.44

Got it, thanks! I managed to repro w/ beta 43, so I think the issue is in one of these: https://github.com/Esri/calcite-components/compare/v1.0.0-beta.42...v1.0.0-beta.43.

@codylawson Do you have a non-Vue repro case by any chance? This will help us git bisect the culprit.

@jcfranco I do not, would a react example be useful or does that have a similar problem as Vue?

@jcfranco while testing next.56 I noticed this bug is no longer reproducible. Hoping that's expected 🎉

@codylawson simplified the date component render cycle for #1111 maybe that also solved this issue

Was this page helpful?
0 / 5 - 0 ratings