Commit 28509908 by Tobias Kaupat

Fix firefox bug: Can not use widget action buttons

parent 7e844745
Pipeline #4868527 passed with stages
in 4 minutes 47 seconds
......@@ -176,16 +176,6 @@
}
}
// TODO: Move to core, for simple reuse
const Prop = React.PropTypes
Widget.propTypes = {
getData: Prop.func.isRequired,
state: Prop.shape({
height: Prop.number.isRequired,
id: Prop.string.isRequired
}).isRequired
};
window.iotDashboardApi.registerWidgetPlugin(TYPE_INFO, Widget);
})();
......@@ -112,10 +112,9 @@ class WidgetButton extends React.Component {
render() {
const iconType = this.props.iconType || "utility"
const data = this.props.widgetState;
return <button className={"slds-button slds-button--icon no-drag" + (this.props.visible !== false ? "" : " slds-hide")}>
<svg aria-hidden="true" className="slds-button__icon slds-button__icon--small"
onClick={() => this.props.onClick(data)}
>
return <button className={"slds-button slds-button--icon no-drag" + (this.props.visible !== false ? "" : " slds-hide")}
onClick={() => this.props.onClick(data)}>
<svg aria-hidden="true" className="slds-button__icon slds-button__icon--small">
<use xlinkHref={"assets/icons/" + iconType + "-sprite/svg/symbols.svg#" + this.props.icon}></use>
</svg>
<span className="slds-assistive-text">{this.props.description}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment