Created
August 22, 2019 03:57
-
-
Save travist/9e61e53a045c31eb88111c1d9ecc6356 to your computer and use it in GitHub Desktop.
Select - Custom Default Value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance.component.onSetItems = function(component, items) { | |
var employees = []; | |
for (var id in component.data) { | |
if ( | |
component.data[id] && | |
(id === 'employee1' || | |
id === 'employee2' || | |
id === 'employee3') | |
) { | |
employees.push(component.data[id].data.email); | |
} | |
} | |
return items.filter(function(item) { | |
return (employees.indexOf(item.data.email) === -1); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment