Skip to content

Commit

Permalink
removing impractical functionality (#1544)
Browse files Browse the repository at this point in the history
* #1454

* minimal changes

* fixe style

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
  • Loading branch information
elsiosanchez and elsiosanchez authored Feb 9, 2022
1 parent 0b43423 commit f50be02
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
39 changes: 32 additions & 7 deletions src/components/ADempiere/DefaultTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<template>
<el-main class="default-table">
<el-row>
<el-col :span="23">
<el-col v-if="isShowSearch" :span="24">
<el-input
v-model="valueToSearch"
clearable
Expand All @@ -32,11 +32,6 @@
/>
</el-input>
</el-col>
<el-col :span="1">
<columns-display-option
:option="currentOption"
/>
</el-col>
</el-row>

<el-table
Expand Down Expand Up @@ -70,7 +65,7 @@
:column-key="fieldAttributes.columnName"
:prop="fieldAttributes.columnName"
sortable
min-width="200"
min-width="210"
:fixed="fieldAttributes.isFixedTableColumn"
>
<template slot-scope="scope">
Expand All @@ -85,6 +80,16 @@
</template>
</el-table-column>
</template>
<el-table-column
fixed="right"
width="50"
>
<template slot="header">
<columns-display-option
:option="currentOption"
/>
</template>
</el-table-column>
</el-table>

<!-- pagination table, set custom or use default change page method -->
Expand Down Expand Up @@ -154,6 +159,10 @@ export default defineComponent({
isTableSelection: {
type: Boolean,
default: true
},
isShowSearch: {
type: Boolean,
default: true
}
},

Expand All @@ -179,6 +188,20 @@ export default defineComponent({
})
})

const sizeOption = computed(() => {
if (props.isShowSearch) {
return 1
}
return 24
})

const styleOption = computed(() => {
if (props.isShowSearch) {
return ''
}
return 'text-align: end; padding-right: 5px;'
})

/**
* Selection columns to be taken into account during the search
*/
Expand Down Expand Up @@ -302,6 +325,8 @@ export default defineComponent({
valueToSearch,
// computeds
headerList,
sizeOption,
styleOption,
recordsWithFilter,
currentOption,
keyColumn,
Expand Down
1 change: 1 addition & 0 deletions src/views/ADempiere/Browser/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
:header="tableHeader"
:data-table="recordsList"
:record-count="recordCount"
:is-show-search="false"
/>
</el-main>
</el-container>
Expand Down

0 comments on commit f50be02

Please sign in to comment.