fix: cannot select section in read_only state

This commit is contained in:
Shariq Ansari 2022-11-07 17:34:16 +05:30
parent 7a2fe91264
commit 8f9717b401

View file

@ -54,8 +54,8 @@ function select_section() {
if (!store.read_only) {
editing.value = true;
nextTick(() => label_input.value.focus());
store.selected_field = props.section.df;
}
store.selected_field = props.section.df;
}
</script>
@ -72,7 +72,10 @@ function select_section() {
@mouseover.stop="hovered = true"
@mouseout.stop="hovered = false"
>
<div :class="['section-header', section.df.label ? '' : 'hidden']">
<div
:class="['section-header', section.df.label ? 'has-label' : '']"
:hidden="!section.df.label && store.read_only"
>
<input
v-if="editing"
ref="label_input"
@ -157,15 +160,19 @@ function select_section() {
}
&.selected .section-header {
display: flex !important;
display: flex;
}
.section-header {
display: flex;
display: none;
justify-content: space-between;
align-items: center;
padding-bottom: 0.75rem;
&.has-label {
display: flex;
}
.input-section-label {
border: none;
margin-left: -2px;