From dc34aa874303d755ab6d36f1a2a02f475e919506 Mon Sep 17 00:00:00 2001 From: srikant Date: Fri, 23 Feb 2024 20:59:55 +0530 Subject: [PATCH] For Palette category use onHeadingClick on Accordion to enable keyboard click Signed-off-by: srikant --- .../palette/palette-flyout-content-category.jsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/canvas_modules/common-canvas/src/palette/palette-flyout-content-category.jsx b/canvas_modules/common-canvas/src/palette/palette-flyout-content-category.jsx index 72b21b10b9..421cc35e40 100644 --- a/canvas_modules/common-canvas/src/palette/palette-flyout-content-category.jsx +++ b/canvas_modules/common-canvas/src/palette/palette-flyout-content-category.jsx @@ -28,9 +28,14 @@ class PaletteFlyoutContentCategory extends React.Component { constructor(props) { super(props); + this.state = { + et: {} + }; + this.onMouseOver = this.onMouseOver.bind(this); this.onMouseLeave = this.onMouseLeave.bind(this); this.categoryClicked = this.categoryClicked.bind(this); + this.accRef = React.createRef(); } onMouseOver(ev) { @@ -98,7 +103,13 @@ class PaletteFlyoutContentCategory extends React.Component { const titleObj = this.getTitleObj(); const content = this.getContent(); return ( - + { + if (this.accRef?.current) { + this.accRef.current.click(); + } + }} + > {content} ); @@ -115,6 +126,7 @@ class PaletteFlyoutContentCategory extends React.Component { value={this.props.category.label} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} + ref={this.accRef} >
{itemImage}