zindex fixes to SplitButton

pull/12/head
cagataycivici 2019-05-21 14:51:08 +03:00
parent 7d50e537eb
commit 33fa933808
2 changed files with 79 additions and 41 deletions

View File

@ -23,11 +23,34 @@ import DomHandler from '../utils/DomHandler';
export default {
props: {
label: String,
icon: String,
model: Array,
disabled: Boolean,
tabindex: String
label: {
type: String,
default: null
},
icon: {
type: String,
default: null
},
model: {
type: Array,
default: null
},
disabled: {
type: Boolean,
default: false
},
tabindex: {
type: String,
default: null
},
autoZIndex: {
type: Boolean,
default: true
},
baseZIndex: {
type: Number,
default: 0
},
},
data() {
return {
@ -53,6 +76,9 @@ export default {
event.preventDefault();
},
onOverlayEnter() {
if (this.autoZIndex) {
this.$refs.overlay.style.zIndex = String(this.baseZIndex + DomHandler.generateZIndex());
}
this.alignOverlay();
this.bindOutsideClickListener();
},

View File

@ -109,10 +109,22 @@ export default {
<td>When present, it specifies that the component should be disabled.</td>
</tr>
<tr>
<td>tabIndex</td>
<td>tabindex</td>
<td>string</td>
<td>null</td>
<td>Index of the element in tabbing order.</td>
</tr>
<tr>
<td>autoZIndex</td>
<td>boolean</td>
<td>true</td>
<td>Whether to automatically manage layering.</td>
</tr>
<tr>
<td>baseZIndex</td>
<td>number</td>
<td>0</td>
<td>Base zIndex value to use in layering.</td>
</tr>
</tbody>
</table>