d3.select(inputEl).attr('value', something) won't seem to work after the user has modified the contents of the input.

Reason: value attribute sets the default value of the input. In order to set the value, use the value property, use: d3.select(inputEl).property('value', something)

TODO: add demos

  1. In vanilla JS + d3 environment
  2. Compare with an example in React: value vs defaultValue
  3. More on attributes vs properties of HTML elements?