UoA-eResearch / research-hub-web

Research Hub Web
https://research-hub.cer.auckland.ac.nz
MIT License
3 stars 2 forks source link

Avoid Angular warnings on filter visibility states #25

Closed uoa-noel closed 5 years ago

uoa-noel commented 5 years ago

When the filter panel was created, it used the disabled property on the filter controls to make them disabled. This is not recommended by Angular, because the FormControl class already has a disabled state. It caused warnings to be emitted. This pull request changes the search filters to use the FormControl disabled state as recommended. The changes caused some functions to throw errors because they don't handle undefined as arguments. I have made them handle undefined as arguments and tests have been added.

uoa-noel commented 5 years ago

Deployed to test successfully with no problems. Soon deploying to prod.