Reduce gap between users in assignment modal

This commit is contained in:
Andrew Kingston 2022-07-29 14:20:35 +01:00
parent 18d71cf23b
commit bbc8cee787
1 changed files with 21 additions and 19 deletions

View File

@ -3,6 +3,7 @@
ModalContent, ModalContent,
PickerDropdown, PickerDropdown,
ActionButton, ActionButton,
Layout,
notifications, notifications,
} from "@budibase/bbui" } from "@budibase/bbui"
import { roles } from "stores/backend" import { roles } from "stores/backend"
@ -79,25 +80,26 @@
onConfirm={() => addData(appData)} onConfirm={() => addData(appData)}
showCloseIcon={false} showCloseIcon={false}
> >
{#each appData as input, index} <Layout noPadding gap="XS">
<PickerDropdown {#each appData as input, index}
autocomplete <PickerDropdown
primaryOptions={optionSections} autocomplete
placeholder={"Search users"} primaryOptions={optionSections}
secondaryPlaceholder="Access" placeholder={"Search users"}
secondaryOptions={$roles} secondaryPlaceholder="Access"
bind:primaryValue={input.id} secondaryOptions={$roles}
bind:secondaryValue={input.role} bind:primaryValue={input.id}
getPrimaryOptionLabel={group => group.name} bind:secondaryValue={input.role}
getPrimaryOptionValue={group => group.name} getPrimaryOptionLabel={group => group.name}
getPrimaryOptionIcon={group => group.icon} getPrimaryOptionValue={group => group.name}
getPrimaryOptionColour={group => group.colour} getPrimaryOptionIcon={group => group.icon}
getSecondaryOptionLabel={role => role.name} getPrimaryOptionColour={group => group.colour}
getSecondaryOptionValue={role => role._id} getSecondaryOptionLabel={role => role.name}
getSecondaryOptionColour={role => RoleUtils.getRoleColour(role._id)} getSecondaryOptionValue={role => role._id}
/> getSecondaryOptionColour={role => RoleUtils.getRoleColour(role._id)}
{/each} />
{/each}
</Layout>
<div> <div>
<ActionButton on:click={addNewInput} icon="Add">Add email</ActionButton> <ActionButton on:click={addNewInput} icon="Add">Add email</ActionButton>
</div> </div>