diff --git a/api-generator/components/dataviewlayoutoptions.js b/api-generator/components/dataviewlayoutoptions.js
index 9e13d26db..e34ae325f 100644
--- a/api-generator/components/dataviewlayoutoptions.js
+++ b/api-generator/components/dataviewlayoutoptions.js
@@ -1,7 +1,29 @@
+const DataViewLayoutOptionsProps = [
+ {
+ name: 'modelValue',
+ type: 'string',
+ default: 'null',
+ description: 'Value of the component.'
+ }
+];
+
+const DataViewLayoutOptionsSlots = [
+ {
+ name: 'listicon',
+ description: 'Custom list icon template.'
+ },
+ {
+ name: 'gridicon',
+ description: 'Custom grid icon template.'
+ }
+];
+
module.exports = {
dataviewlayoutoptions: {
name: 'DataViewLayoutOptions',
description: 'When both layout modes are enabled in DataView, a UI element would be necessary to let the user toggle between the view. DataViewLayoutOptions is a helper component to display a buttonset to choose the layout mode in DataView.',
- 'doc-url': 'dataview'
+ 'doc-url': 'dataview',
+ props: DataViewLayoutOptionsProps,
+ slots: DataViewLayoutOptionsSlots
}
};
diff --git a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts
index ccd8807d7..f463acb0f 100755
--- a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts
+++ b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts
@@ -7,6 +7,7 @@
* @module dataviewlayoutoptions
*
*/
+import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
@@ -20,9 +21,18 @@ export interface DataViewLayoutOptionsProps {
}
/**
- * Defines valid propslotserties in DataViewLayoutOptions component.
+ * Defines valid slots in DataViewLayoutOptions component.
*/
-export interface DataViewLayoutOptionsSlots {}
+export interface DataViewLayoutOptionsSlots {
+ /**
+ * Custom list icon template.
+ */
+ listicon(): VNode[];
+ /**
+ * Custom grid icon template.
+ */
+ gridicon(): VNode[];
+}
/**
* Defines valid emits in DataViewLayoutOptions component.
diff --git a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.spec.js b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.spec.js
index 38c6d5a1c..9e0f14dfd 100644
--- a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.spec.js
+++ b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.spec.js
@@ -23,7 +23,6 @@ describe('DataViewLayoutOptions.vue', () => {
});
expect(wrapper.find('.p-dataview-layout-options').exists()).toBe(true);
- expect(wrapper.find('.p-highlight > .pi-th-large').exists()).toBe(true);
wrapper.vm.$emit('update:modelValue', 'list');
diff --git a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.vue b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.vue
index dc84ae619..0b6ff0337 100755
--- a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.vue
+++ b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.vue
@@ -1,15 +1,22 @@