Fixed 224 for SplitButton
parent
819b5d5ac7
commit
2ecd1bda48
|
@ -41,10 +41,6 @@ export default {
|
|||
baseZIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
align: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -87,11 +83,9 @@ export default {
|
|||
hide() {
|
||||
this.visible = false;
|
||||
},
|
||||
onEnter() {
|
||||
onEnter(element) {
|
||||
this.appendContainer();
|
||||
if (this.align) {
|
||||
this.alignOverlay();
|
||||
}
|
||||
this.alignOverlay();
|
||||
this.bindOutsideClickListener();
|
||||
this.bindResizeListener();
|
||||
|
||||
|
@ -104,7 +98,10 @@ export default {
|
|||
this.unbindResizeListener();
|
||||
},
|
||||
alignOverlay() {
|
||||
DomHandler.absolutePosition(this.$refs.container, this.target);
|
||||
if (this.appendTo)
|
||||
DomHandler.absolutePosition(this.$refs.container, this.target);
|
||||
else
|
||||
DomHandler.relativePosition(this.$refs.container, this.target);
|
||||
},
|
||||
bindOutsideClickListener() {
|
||||
if (!this.outsideClickListener) {
|
||||
|
|
|
@ -8,5 +8,6 @@ export declare class SplitButton extends Vue {
|
|||
tabindex?: string;
|
||||
autoZIndex?: boolean;
|
||||
baseZIndex?: number;
|
||||
appendTo?: string;
|
||||
$emit(eventName: 'click', event: Event): this;
|
||||
}
|
|
@ -3,7 +3,8 @@
|
|||
<PVSButton type="button" :icon="icon" :label="label" @click="onClick" :disabled="disabled" :tabindex="tabindex" />
|
||||
<PVSButton type="button" class="p-splitbutton-menubutton" icon="pi pi-caret-down" @click="onDropdownButtonClick" :disabled="disabled"
|
||||
aria-haspopup="true" :aria-controls="ariaId + '_overlay'"/>
|
||||
<PVSMenu :id="ariaId + '_overlay'" ref="menu" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :align="false" />
|
||||
<PVSMenu :id="ariaId + '_overlay'" ref="menu" :model="model" :popup="true" :autoZIndex="autoZIndex"
|
||||
:baseZIndex="baseZIndex" :appendTo="appendTo"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -41,6 +42,10 @@ export default {
|
|||
baseZIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
appendTo: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -128,6 +128,12 @@ export default {
|
|||
<td>number</td>
|
||||
<td>0</td>
|
||||
<td>Base zIndex value to use in layering.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>appendTo</td>
|
||||
<td>string</td>
|
||||
<td>null</td>
|
||||
<td>Id of the element or "body" for document where the overlay should be appended to.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue