From 7b61eaf5ca0e9df7dad4064dbb636df8856de8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fatay=20=C3=87ivici?= Date: Tue, 27 Sep 2016 15:15:47 +0300 Subject: [PATCH] Fixed #947 --- components/splitbutton/splitbutton.css | 7 ++++--- components/splitbutton/splitbutton.ts | 16 ++++++++++------ showcase/demo/splitbutton/splitbuttondemo.html | 6 ++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/components/splitbutton/splitbutton.css b/components/splitbutton/splitbutton.css index de1dabe1807..e0413ba716f 100644 --- a/components/splitbutton/splitbutton.css +++ b/components/splitbutton/splitbutton.css @@ -1,6 +1,8 @@ .ui-splitbutton { position: relative; padding-right: 2em; + display: inline-block; + zoom: 1; } .ui-splitbutton .ui-button.ui-splitbutton-menubutton { @@ -11,9 +13,8 @@ right: 0px; } -.ui-splitbutton { - display: inline-block; - zoom: 1; +.ui-splitbutton.ui-state-disabled button { + cursor: default; } .ui-fluid .ui-splitbutton { diff --git a/components/splitbutton/splitbutton.ts b/components/splitbutton/splitbutton.ts index 781848d73be..a62b8bfe425 100644 --- a/components/splitbutton/splitbutton.ts +++ b/components/splitbutton/splitbutton.ts @@ -7,20 +7,22 @@ import {Router} from '@angular/router'; @Component({ selector: 'p-splitButton', template: ` -
+
@@ -61,6 +63,8 @@ export class SplitButton implements OnInit,OnDestroy { @Input() menuStyle: any; @Input() menuStyleClass: string; + + @Input() disabled: boolean; protected hoverDefaultBtn: boolean; diff --git a/showcase/demo/splitbutton/splitbuttondemo.html b/showcase/demo/splitbutton/splitbuttondemo.html index cc692d2c6c3..f3536d17af4 100644 --- a/showcase/demo/splitbutton/splitbuttondemo.html +++ b/showcase/demo/splitbutton/splitbuttondemo.html @@ -87,6 +87,12 @@

Attributes

null Style class of the overlay menu. + + disabled + boolean + false + When present, it specifies that the component should be disabled. +