mirror of
https://github.com/frappe/books.git
synced 2025-01-11 02:36:14 +00:00
incr: remove chevrons when readonly
This commit is contained in:
parent
ce87ff6802
commit
3a527c1fdd
@ -17,7 +17,7 @@
|
|||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-show="!showInput"
|
v-show="!showInput"
|
||||||
:class="[inputClasses, 'cursor-text']"
|
:class="[inputClasses, 'cursor-text whitespace-nowrap overflow-x-scroll']"
|
||||||
@click="activateInput"
|
@click="activateInput"
|
||||||
@focus="activateInput"
|
@focus="activateInput"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
@ -27,11 +27,12 @@
|
|||||||
v-if="value"
|
v-if="value"
|
||||||
>
|
>
|
||||||
<TableRow
|
<TableRow
|
||||||
|
v-for="row in value"
|
||||||
:class="{ 'pointer-events-none': isReadOnly }"
|
:class="{ 'pointer-events-none': isReadOnly }"
|
||||||
ref="table-row"
|
ref="table-row"
|
||||||
v-for="row in value"
|
|
||||||
:key="row.name"
|
:key="row.name"
|
||||||
v-bind="{ row, tableFields, size, ratio, isNumeric }"
|
v-bind="{ row, tableFields, size, ratio, isNumeric }"
|
||||||
|
:read-only="isReadOnly"
|
||||||
@remove="removeRow(row)"
|
@remove="removeRow(row)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
<!-- Data Input Form Control -->
|
<!-- Data Input Form Control -->
|
||||||
<FormControl
|
<FormControl
|
||||||
|
v-for="df in tableFields"
|
||||||
:size="size"
|
:size="size"
|
||||||
class="py-2"
|
class="py-2"
|
||||||
|
:read-only="readOnly"
|
||||||
:input-class="{ 'text-right': isNumeric(df), 'bg-transparent': true }"
|
:input-class="{ 'text-right': isNumeric(df), 'bg-transparent': true }"
|
||||||
:key="df.fieldname"
|
:key="df.fieldname"
|
||||||
v-for="df in tableFields"
|
|
||||||
:df="df"
|
:df="df"
|
||||||
:value="row[df.fieldname]"
|
:value="row[df.fieldname]"
|
||||||
@change="(value) => onChange(df, value)"
|
@change="(value) => onChange(df, value)"
|
||||||
@ -50,6 +51,7 @@ export default {
|
|||||||
size: String,
|
size: String,
|
||||||
ratio: Array,
|
ratio: Array,
|
||||||
isNumeric: Function,
|
isNumeric: Function,
|
||||||
|
readOnly: Boolean,
|
||||||
},
|
},
|
||||||
emits: ['remove'],
|
emits: ['remove'],
|
||||||
components: {
|
components: {
|
||||||
|
@ -297,7 +297,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
submitted() {
|
submitted() {
|
||||||
return Boolean(this.doc.schema.isSubmittable && this.doc.submitted);
|
return this.doc.isSubmitted;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user