Colored row in results
This commit is contained in:
@@ -72,7 +72,9 @@ const tproducts = computed(() => {
|
||||
return prod;
|
||||
})
|
||||
})
|
||||
|
||||
const bodyRowClassNameFunction = (item) => {
|
||||
if (item.country == form.country.code) return 'result-country';
|
||||
};
|
||||
const filterOptions = computed(() => {
|
||||
const filterOptionsArray = [];
|
||||
if (productsCriteria.value != 'All' && productsCriteria.value != null) {
|
||||
@@ -381,7 +383,7 @@ watch(ccodes, (codes) => {
|
||||
<span class="font-extrabold font-mono">Results <b v-if="itemCode">for {{ itemCode }}</b> </span>
|
||||
</div>
|
||||
<div>
|
||||
<EasyTable :rows-per-page=25 :headers="hproducts" :items="tproducts" alternating>
|
||||
<EasyTable :rows-per-page=25 :headers="hproducts" :items="tproducts" :body-row-class-name="bodyRowClassNameFunction" alternating>
|
||||
<template #item-countryName="{ countryName, url }">
|
||||
<a class="underline" target="_blank" :href="url">{{ countryName }}</a>
|
||||
</template>
|
||||
@@ -402,7 +404,7 @@ watch(ccodes, (codes) => {
|
||||
<span class="font-extrabold font-mono">Country in which search product</span>
|
||||
</div>
|
||||
<div>
|
||||
<multiselect :close-on-select="false" :multiple="false" v-model="form.country" :options="ccodes"
|
||||
<multiselect :close-on-select="true" :multiple="false" v-model="form.country" :options="ccodes"
|
||||
label="country" track-by="code">
|
||||
</multiselect>
|
||||
</div>
|
||||
@@ -503,6 +505,10 @@ watch(ccodes, (codes) => {
|
||||
top: 40px;
|
||||
width: 128px;
|
||||
}
|
||||
|
||||
:root .result-country {
|
||||
--easy-table-body-row-background-color: yellow !important;
|
||||
}
|
||||
</style>
|
||||
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user