app/javascript/components/vm-server-relationship-form/vm-server-relationship-form.schema.js
import { componentTypes } from '@@ddf';
const createSchema = (promise) => ({
fields: [{
component: componentTypes.SELECT,
name: 'serverId',
id: 'serverId',
label: __('Select Server:'),
placeholder: `<${__('Not a Server')}>`,
includeEmpty: true,
loadOptions: () => promise.then(({ resources }) => resources.map(({ id, name }) => ({ label: name, value: id }))),
}],
});
export default createSchema;