freedomotic / fd-vue-webapp

A Vue.js web application for Freedomotic Open IoT framework
http://fd-vue-webapp.herokuapp.com/
GNU Affero General Public License v3.0
65 stars 66 forks source link

Disable expand behaviours when the list is empty #230

Closed leobia closed 4 years ago

leobia commented 4 years ago

Fixes #228

Side note: The termometer Thing have the arrow enabled even if it shows nothing because the thing.behaviours list contains an object. Here a console log of the thermometer behavior {"@class":"com.freedomotic.model.object.RangedIntBehavior","name":"temperature","description":"","active":true,"priority":-1,"readOnly":true,"value":0,"max":1000,"min":-600,"scale":10,"step":1}

mcicolella commented 4 years ago

Ok. The thermometer has a "readOnly" behaviour. Maybe we should disable the control when the list is empty or it contains exclusively "readOnly" behaviours.

leobia commented 4 years ago

The expand toggle is now disabled when the behaviours list is empty or contains only readOnly items

mcicolella commented 4 years ago

Great work, thanks!