Add tests, update changelog and minor fixes
This commit is contained in:
@@ -905,7 +905,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
||||
});
|
||||
}
|
||||
|
||||
if (prevProps.name !== this.props.name && this.props.name) {
|
||||
if (this.props.name && prevProps.name !== this.props.name) {
|
||||
this.setState({
|
||||
name: this.props.name,
|
||||
});
|
||||
|
||||
@@ -257,6 +257,7 @@ export const ExportDialog = ({
|
||||
onClick={() => {
|
||||
setModalIsShown(true);
|
||||
}}
|
||||
data-testid="export-button"
|
||||
icon={exportFile}
|
||||
type="button"
|
||||
aria-label={t("buttons.export")}
|
||||
|
||||
@@ -45,10 +45,6 @@ export class ProjectName extends Component<Props> {
|
||||
|
||||
public render() {
|
||||
return this.props.isNameEditable ? (
|
||||
<span className="TextInput" aria-label={this.props.label}>
|
||||
{this.props.value}
|
||||
</span>
|
||||
) : (
|
||||
<span
|
||||
suppressContentEditableWarning
|
||||
ref={this.makeEditable}
|
||||
@@ -62,6 +58,10 @@ export class ProjectName extends Component<Props> {
|
||||
>
|
||||
{this.props.value}
|
||||
</span>
|
||||
) : (
|
||||
<span className="TextInput" aria-label={this.props.label}>
|
||||
{this.props.value}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {
|
||||
"ToolIcon--selected": props.selected,
|
||||
},
|
||||
)}
|
||||
data-testid={props["data-testid"]}
|
||||
hidden={props.hidden}
|
||||
title={props.title}
|
||||
aria-label={props["aria-label"]}
|
||||
|
||||
Reference in New Issue
Block a user