fix: 8543 added disabled flag support in icon button table widget (#8950)
* fix: 8543 added disabled flag support in icon button table widget * updated test case
This commit is contained in:
parent
f6b8900246
commit
4b2c1fc316
|
|
@ -95,6 +95,14 @@ describe("Table Widget property pane feature validation", function() {
|
|||
force: true,
|
||||
});
|
||||
cy.get(".t--widget-tablewidget .tbody .bp3-icon-add").should("exist");
|
||||
|
||||
// disabled icon btn
|
||||
cy.CheckWidgetProperties(commonlocators.disableCheckbox);
|
||||
cy.getTableDataSelector("0", "4").then((selector) => {
|
||||
cy.get(selector + " button.bp3-disabled").should("exist");
|
||||
});
|
||||
cy.UncheckWidgetProperties(commonlocators.disableCheckbox);
|
||||
|
||||
//Delete Column
|
||||
cy.get(".t--property-pane-back-btn").click({
|
||||
force: true,
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ interface RenderIconButtonProps {
|
|||
boxShadowColor: string;
|
||||
onCommandClick: (dynamicTrigger: string, onComplete: () => void) => void;
|
||||
isCellVisible: boolean;
|
||||
disabled: boolean;
|
||||
}
|
||||
export const renderIconButton = (
|
||||
props: RenderIconButtonProps,
|
||||
|
|
@ -211,6 +212,7 @@ export const renderIconButton = (
|
|||
boxShadowColor={props.boxShadowColor}
|
||||
buttonColor={props.buttonColor}
|
||||
buttonVariant={props.buttonVariant}
|
||||
disabled={props.disabled}
|
||||
iconName={props.iconName}
|
||||
isSelected={props.isSelected}
|
||||
key={index}
|
||||
|
|
@ -231,6 +233,7 @@ function IconButton(props: {
|
|||
borderRadius: ButtonBorderRadius;
|
||||
boxShadow: ButtonBoxShadow;
|
||||
boxShadowColor: string;
|
||||
disabled: boolean;
|
||||
}): JSX.Element {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const onComplete = () => {
|
||||
|
|
@ -257,6 +260,7 @@ function IconButton(props: {
|
|||
boxShadowColor={props.boxShadowColor}
|
||||
buttonColor={props.buttonColor}
|
||||
buttonVariant={props.buttonVariant}
|
||||
disabled={props.disabled}
|
||||
icon={props.iconName}
|
||||
loading={loading}
|
||||
onClick={handleClick}
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ class TableWidget extends BaseWidget<TableWidgetProps, WidgetState> {
|
|||
boxShadow: cellProperties.boxShadow || "NONE",
|
||||
boxShadowColor: cellProperties.boxShadowColor || "",
|
||||
isCellVisible: cellProperties.isCellVisible ?? true,
|
||||
disabled: !!cellProperties.isDisabled,
|
||||
};
|
||||
return renderIconButton(iconButtonProps, isHidden, cellProperties);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user