diff --git a/doc/datatable/ConditionalStyleDoc.vue b/doc/datatable/ConditionalStyleDoc.vue
index f9b63dfe4..8de5b9453 100644
--- a/doc/datatable/ConditionalStyleDoc.vue
+++ b/doc/datatable/ConditionalStyleDoc.vue
@@ -3,7 +3,7 @@
Particular rows and cells can be styled based on conditions. The rowClass receives a row data as a parameter to return a style class for a row whereas cells are customized using the body template.
-
+
@@ -28,7 +28,7 @@ export default {
products: null,
code: {
basic: `
-
+
@@ -43,7 +43,7 @@ export default {
options: `
-
+
@@ -74,6 +74,11 @@ export default {
rowClass(data) {
return [{ 'bg-primary': data.category === 'Fitness' }];
},
+ rowStyle(data) {
+ if (data.quantity === 0) {
+ return { fontWeight: 'bold', fontStyle: 'italic' };
+ }
+ },
stockClass(data) {
return [
'border-circle w-2rem h-2rem inline-flex font-bold justify-content-center align-items-center text-sm',
@@ -90,7 +95,7 @@ export default {
composition: `
-
+
@@ -118,6 +123,11 @@ const products = ref();
const rowClass = (data) => {
return [{ 'bg-primary': data.category === 'Fitness' }];
};
+const rowStyle = (data) => {
+ if (data.quantity === 0) {
+ return { fontWeight: 'bold', fontStyle: 'italic' };
+ }
+};
const stockClass = (data) => {
return [
'border-circle w-2rem h-2rem inline-flex font-bold justify-content-center align-items-center text-sm',
@@ -154,6 +164,11 @@ const stockClass = (data) => {
rowClass(data) {
return [{ 'bg-primary': data.category === 'Fitness' }];
},
+ rowStyle(data) {
+ if (data.quantity === 0) {
+ return { fontWeight: 'bold', fontStyle: 'italic' };
+ }
+ },
stockClass(data) {
return [
'border-circle w-2rem h-2rem inline-flex font-bold justify-content-center align-items-center text-sm',