use display to hide picker button instead of prop
This commit is contained in:
parent
2aff73ac25
commit
84571e36c2
|
@ -92,6 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
</FancyField>
|
</FancyField>
|
||||||
|
|
||||||
|
<div id="picker-wrapper">
|
||||||
<Picker
|
<Picker
|
||||||
customAnchor={wrapper}
|
customAnchor={wrapper}
|
||||||
onlyPopover={true}
|
onlyPopover={true}
|
||||||
|
@ -109,8 +110,12 @@
|
||||||
onSelectOption={onChange}
|
onSelectOption={onChange}
|
||||||
isOptionSelected={option => option === value}
|
isOptionSelected={option => option === value}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
#picker-wrapper :global(.spectrum-Picker) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.value {
|
.value {
|
||||||
display: block;
|
display: block;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
export let customPopoverHeight
|
export let customPopoverHeight
|
||||||
export let align = "left"
|
export let align = "left"
|
||||||
export let footer = null
|
export let footer = null
|
||||||
export let onlyPopover = false
|
|
||||||
export let customAnchor = null
|
export let customAnchor = null
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
@ -91,7 +90,6 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !onlyPopover}
|
|
||||||
<button
|
<button
|
||||||
{id}
|
{id}
|
||||||
class="spectrum-Picker spectrum-Picker--sizeM"
|
class="spectrum-Picker spectrum-Picker--sizeM"
|
||||||
|
@ -144,9 +142,8 @@
|
||||||
<use xlink:href="#spectrum-css-icon-Chevron100" />
|
<use xlink:href="#spectrum-css-icon-Chevron100" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
|
||||||
<Popover
|
<Popover
|
||||||
anchor={!onlyPopover ? button : customAnchor}
|
anchor={customAnchor ? customAnchor : button}
|
||||||
align={align || "left"}
|
align={align || "left"}
|
||||||
bind:this={popover}
|
bind:this={popover}
|
||||||
{open}
|
{open}
|
||||||
|
|
|
@ -253,6 +253,8 @@
|
||||||
notifications.error("A group must be specified")
|
notifications.error("A group must be specified")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log(group)
|
||||||
|
console.log(role)
|
||||||
try {
|
try {
|
||||||
if (group?.builder?.apps.includes(prodAppId)) {
|
if (group?.builder?.apps.includes(prodAppId)) {
|
||||||
await removeGroupAppBuilder(group._id)
|
await removeGroupAppBuilder(group._id)
|
||||||
|
|
Loading…
Reference in New Issue