Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing impractical functionality #1544

Merged
merged 3 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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