mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
UI/InfoTableRow testing (#12811)
* updates storybook * adds computed property valueIsEmpty * adds tests to info table row
This commit is contained in:
@@ -44,4 +44,21 @@ export default Component.extend({
|
||||
valueIsBoolean: computed('value', function() {
|
||||
return typeOf(this.value) === 'boolean';
|
||||
}),
|
||||
|
||||
valueIsEmpty: computed('value', function() {
|
||||
let { value } = this;
|
||||
if (typeOf(value) === 'array' && value.length === 0) {
|
||||
return true;
|
||||
}
|
||||
switch (value) {
|
||||
case undefined:
|
||||
return true;
|
||||
case null:
|
||||
return true;
|
||||
case '':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user