1
0
Fork 0
mirror of synced 2024-07-04 14:01:27 +12:00

Reduce space between users and add secondary placeholder

This commit is contained in:
Andrew Kingston 2022-08-01 10:31:28 +01:00
parent 04325e1ed4
commit 272ff64ac0

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"
@ -78,23 +79,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
secondaryOptions={$roles} primaryOptions={optionSections}
bind:primaryValue={input.id} secondaryOptions={$roles}
bind:secondaryValue={input.role} secondaryPlaceholder="Access"
bind:searchTerm={search} bind:primaryValue={input.id}
getPrimaryOptionLabel={group => group.name} bind:secondaryValue={input.role}
getPrimaryOptionValue={group => group.name} bind:searchTerm={search}
getPrimaryOptionIcon={group => group.icon} getPrimaryOptionLabel={group => group.name}
getPrimaryOptionColour={group => group.colour} getPrimaryOptionValue={group => group.name}
getSecondaryOptionLabel={role => role.name} getPrimaryOptionIcon={group => group.icon}
getSecondaryOptionValue={role => role._id} getPrimaryOptionColour={group => group.colour}
getSecondaryOptionColour={role => RoleUtils.getRoleColour(role._id)} getSecondaryOptionLabel={role => role.name}
/> getSecondaryOptionValue={role => role._id}
{/each} getSecondaryOptionColour={role => RoleUtils.getRoleColour(role._id)}
/>
{/each}
</Layout>
<div> <div>
<ActionButton on:click={addNewInput} icon="Add">Add email</ActionButton> <ActionButton on:click={addNewInput} icon="Add">Add email</ActionButton>
</div> </div>