Skip to content

Commit d25b0b7

Browse files
committed
[grid] Removing arrow function to avoid render calls.
1 parent 5e3439d commit d25b0b7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

java/server/test/org/openqa/selenium/grid/router/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ java_selenium_test_suite(
3838
browsers = [
3939
"chrome",
4040
"firefox",
41+
"edge",
4142
],
4243
javacopts = [
4344
"--release",

javascript/grid-ui/src/components/RunningSessions/RunningSessions.tsx

+13-4
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,18 @@ export default function RunningSessions(props) {
266266

267267
const emptyRows = rowsPerPage - Math.min(rowsPerPage, rows.length - page * rowsPerPage);
268268

269+
const displaySessionInfo = (id: string) => {
270+
const handleInfoIconClick = () => {
271+
handleDialogOpen(id);
272+
}
273+
return (
274+
<IconButton className={classes.buttonMargin}
275+
onClick={handleInfoIconClick}>
276+
<InfoIcon/>
277+
</IconButton>
278+
);
279+
}
280+
269281
return (
270282
<div className={classes.root}>
271283
{rows.length > 0 && (
@@ -316,10 +328,7 @@ export default function RunningSessions(props) {
316328
alt="Browser Logo"
317329
/>
318330
{browserVersion(row.browserVersion as string)}
319-
<IconButton className={classes.buttonMargin}
320-
onClick={() => handleDialogOpen(row.id as string)}>
321-
<InfoIcon/>
322-
</IconButton>
331+
{displaySessionInfo(row.id as string)}
323332
<Dialog onClose={handleDialogClose} aria-labelledby="session-info-dialog"
324333
open={rowOpen === row.id}>
325334
<DialogTitle id="session-info-dialog">

0 commit comments

Comments
 (0)