feat(runtime): Add "data-testId" attribute to Columns node (#44)

This commit is contained in:
Eric Tuvesson
2024-06-27 15:42:25 +02:00
committed by GitHub
parent 3fb3668fc3
commit c5754c9160
2 changed files with 14 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ const ColumnsNode = {
]
},
initialize() {
initialize() { this.props.attrs = {};
this.props.layoutString = '1 2 1';
this.props.minWidth = 0;
this.props.marginX = 16;
@@ -62,6 +62,16 @@ const ColumnsNode = {
);
}
this.forceUpdate();
}
},
testId: {
index: 100009,
displayName: 'Test ID Attribute',
group: 'Advanced HTML',
type: 'string',
set(value) {
this.props.attrs["data-testid"] = value;
this.forceUpdate();
}
}