openlawteam / openlaw-elements

Render React form components and sections from an OpenLaw template.
https://docs.openlaw.io/openlaw-elements/
Apache License 2.0
15 stars 11 forks source link

Deleting Date, DateTime, and Identity types from a Collection does not remove the selected item #41

Closed jdville03 closed 4 years ago

jdville03 commented 5 years ago

With a Collection of Date, DateTime~, or Identity~ variables, the last item from the list will be the one to be removed even when you try to delete one before that.

https://www.useloom.com/share/5f33ab86059643759fa5fdce180a80a5

jtrein commented 5 years ago

45 fixes Identity

jtrein commented 5 years ago

Dates are a bit harder to fix. I may go back in and do my best to add the cleanest hack I can. I opened a bug in core: https://github.com/openlawteam/openlaw-core/issues/97

jeamick commented 5 years ago

Hello @jtrein,

Is there a way you could explain why Dates are harder to fix ? Thanks

JM

jtrein commented 5 years ago

Hi @jeamick, from what I have understood it's a bug in our openlaw-core library (https://github.com/openlawteam/openlaw-core/issues/97). The dates appear to change within a Collection (maybe also outside a Collection) as the values within the Collection are updated. More information about the bug with Dates will be handled via https://github.com/openlawteam/openlaw-core/issues/97.

I'll bump the issue over there to see if any planned work to investigate is ahead.

jtrein commented 5 years ago

A fix should be merged soon for Date and DateTime, then we can close this guy, after some tests are written. https://github.com/openlawteam/openlaw-core/pull/175

jtrein commented 4 years ago

Fixed