codeamp / panel

CodeAmp Web Application. Built with React.js, GraphQL and Material-UI.
12 stars 7 forks source link

Fix secret version histroy selection problem #309 #353

Closed davechan813 closed 5 years ago

davechan813 commented 5 years ago

Fix #309. Now both history version selection should work in both admin secrets and project secrets. Also change table row to cursor so make more sense to click.

Set the form value to the state, so that the page is re-rendered when value changed.

A little tricky in the Secrets/paginator.js. Part of render return is wrapped in Query, but we cannot change state in query. I adopt a method using ||. The first time we opened drawer, this.state.formValue will be undefined and will rendered this.form.values()['value']. But after that, these two values will sync.