fixes numbering system for dynamic bindings in evaluated popup text (#11005)

This commit is contained in:
Ayangade Adeoluwa 2022-02-11 11:53:50 +01:00 committed by GitHub
parent 980c8cbf57
commit c06c8b817e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,8 +237,9 @@ export function PreparedStatementViewer(props: {
});
return <div />;
}
const stringSegments = value.split(/\$\d/);
const $params = [...value.matchAll(/\$\d/g)].map((matches) => matches[0]);
const stringSegments = value.split(/\$\d+/);
const $params = [...value.matchAll(/\$\d+/g)].map((matches) => matches[0]);
const paramsWithTooltips = $params.map((param) => (
<Tooltip content={<span>{parameters[param]}</span>} key={param}>
<PreparedStatementParameter key={param}>