@websolutespa/payload-plugin-bowl
Version:
Bowl PayloadCms plugin of the BOM Repository
23 lines (22 loc) • 542 B
JavaScript
import { deepMerge } from '@websolutespa/payload-utils';
export const SelectDefaults = {
name: 'select',
type: 'select',
hasMany: false,
admin: {
isClearable: true
},
options: []
};
export const withSelect = (options = {})=>{
const field = deepMerge(SelectDefaults, options);
return field;
};
export const withSelectRequired = (options = {})=>{
const field = deepMerge({
...SelectDefaults,
required: true
}, options);
return field;
};
//# sourceMappingURL=withSelect.js.map