2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 11:55:46 +00:00

fix: Disable pointer events when readonly

This commit is contained in:
Faris Ansari 2020-02-03 23:08:06 +05:30
parent 75a7e1d58d
commit 4784cd5793
2 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,8 @@ export default {
let classes = [ let classes = [
{ {
'px-3 py-2': this.size !== 'small', 'px-3 py-2': this.size !== 'small',
'px-2 py-1': this.size === 'small' 'px-2 py-1': this.size === 'small',
'pointer-events-none': this.isReadOnly
}, },
'focus:outline-none focus:bg-gray-200 rounded w-full text-gray-900 placeholder-gray-400' 'focus:outline-none focus:bg-gray-200 rounded w-full text-gray-900 placeholder-gray-400'
]; ];

View File

@ -19,6 +19,7 @@
</Row> </Row>
<div class="overflow-auto" :style="{ 'max-height': rowContainerHeight }"> <div class="overflow-auto" :style="{ 'max-height': rowContainerHeight }">
<TableRow <TableRow
:class="{ 'pointer-events-none': isReadOnly }"
ref="table-row" ref="table-row"
v-for="row in value" v-for="row in value"
:key="row.name" :key="row.name"