Allow role select to accept a placeholder
This commit is contained in:
parent
71b18a4260
commit
f351fb0019
|
@ -5,15 +5,16 @@
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
export let error
|
export let error
|
||||||
|
export let placeholder = null
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
bind:value
|
bind:value
|
||||||
on:change
|
on:change
|
||||||
options={$roles}
|
options={$roles}
|
||||||
placeholder={null}
|
|
||||||
getOptionLabel={role => role.name}
|
getOptionLabel={role => role.name}
|
||||||
getOptionValue={role => role._id}
|
getOptionValue={role => role._id}
|
||||||
getOptionColour={role => RoleUtils.getRoleColour(role._id)}
|
getOptionColour={role => RoleUtils.getRoleColour(role._id)}
|
||||||
|
{placeholder}
|
||||||
{error}
|
{error}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue