diff --git a/api-generator/components/splitbutton.js b/api-generator/components/splitbutton.js index 8fc5ec1bf..ab16eccd3 100644 --- a/api-generator/components/splitbutton.js +++ b/api-generator/components/splitbutton.js @@ -35,6 +35,12 @@ const SplitButtonProps = [ default: 'body', description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached.' }, + { + name: 'disabled', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the element should be disabled.' + }, { name: 'class', type: 'string', @@ -46,6 +52,12 @@ const SplitButtonProps = [ type: 'any', default: 'null', description: 'Inline of the component.' + }, + { + name: 'menuButtonIcon', + type: 'string', + default: 'null', + description: 'Name of the menu button icon.' } ]; diff --git a/components/splitbutton/SplitButton.d.ts b/components/splitbutton/SplitButton.d.ts index 64f479a20..74bc561fe 100755 --- a/components/splitbutton/SplitButton.d.ts +++ b/components/splitbutton/SplitButton.d.ts @@ -53,6 +53,10 @@ export interface SplitButtonProps { * Uses to pass all properties of the HTMLButtonElement to the menu button. */ menuButtonProps?: ButtonHTMLAttributes | undefined; + /** + * Name of the menu button icon. + */ + menuButtonIcon?: string | undefined; } export interface SplitButtonSlots { diff --git a/components/splitbutton/SplitButton.vue b/components/splitbutton/SplitButton.vue index a37b13999..0ff9a2052 100755 --- a/components/splitbutton/SplitButton.vue +++ b/components/splitbutton/SplitButton.vue @@ -7,7 +7,7 @@ ref="button" type="button" class="p-splitbutton-menubutton" - icon="pi pi-chevron-down" + :icon="menuButtonIcon" :disabled="disabled" aria-haspopup="true" :aria-expanded="isExpanded" @@ -72,6 +72,10 @@ export default { menuButtonProps: { type: null, default: null + }, + menuButtonIcon: { + type: String, + default: 'pi pi-chevron-down' } }, data() { diff --git a/pages/splitbutton/SplitButtonDoc.vue b/pages/splitbutton/SplitButtonDoc.vue index 5bac82abc..d3426b673 100755 --- a/pages/splitbutton/SplitButtonDoc.vue +++ b/pages/splitbutton/SplitButtonDoc.vue @@ -182,6 +182,12 @@ export default {