upenndigitalscholarship / deep

https://deep.pennds.org/
MIT License
3 stars 1 forks source link

Choice fields are not properly updating when you change them #31

Closed ZacharyLesser closed 1 year ago

ZacharyLesser commented 1 year ago

If you select Author (Modern Attribution), e.g., then change it to Authorial Status, e.g., the drop-down list of choices does not change. It should change automatically without needing to reload the page

apjanco commented 1 year ago

Some progress today, Choice.js alters the select element when initialized.

  1. current approach, reset the div to a select element, but this breaks other things.
  2. or if the problem was trying to create a new Choice object, if that is so, then need to a. add a condition to check if it's a vanilla select element or an initialized Choice object b. if it's already initialized, then clear choices and set new choices
apjanco commented 1 year ago

Gentler approach works, TODO breaks OR blocks, need to fix