codeant-ai-for-open-source[bot] commented on code in PR #42009:
URL: https://github.com/apache/superset/pull/42009#discussion_r3578670669
##########
superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx:
##########
@@ -215,6 +217,13 @@ const TreeNodeRenderer: React.FC<TreeNodeRendererProps> =
({
node.toggle();
}
}}
+ onKeyDown={handleKeyboardActivation(() => {
+ if (node.isLeaf) {
+ node.select();
+ } else {
+ node.toggle();
+ }
+ })}
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag keyboard activation/focusability on the inner div used by
react-arborist tree nodes when the tree library already provides roving focus
and Enter/Space activation at the tree-item level; in this case the handler may
be kept only to satisfy the click-events-have-key-events lint rule.
**Applied to:**
-
`superset-frontend/src/SqlLab/components/TableExploreTree/TreeNodeRenderer.tsx`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]