Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

OnClick is Not working


Why the On Click is Not working if the App is inactive for sometimes and also the button click once clicked it the state stays in click ui


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (23)


Hi Rakul,

Could you please provide us with the following information?

Your product version.
Page/component that causes an issue
Also, if there are any steps on how we can reproduce this problem please describe them.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Version: metronic8/react/demo3
The Issue on AsideDefault.tsx File I Think data-kt-menu-trigger="click" is Not Triggered Properly If the Page is Inactive for Sometimes This is Happening All over Project on Events Like click, hover



Hi Rakul,

Do you have the same problem on our preview page?
https://preview.keenthemes.com/metronic8/react/demo3/

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Its not Occurring Frequently but its happening and there is not errors on Console to Kindly Can you Check Null Issues and Type Safety Issues on The Click Events



Hi,

We will continue testing our theme to resolve this issue. However, as we haven't identified the exact cause of the problem yet, we're unable to provide an immediate solution.

The issue is likely related to missing events on your elements. You can potentially fix it by re-calling the component reinitialization function. For reference, please check the src/_metronic/layout/MasterInit.tsx file.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



The Error Occurs While Doing Multiple refresh and if in some scenario while dev tool is opened



Hi Rakul,

Unfortunately, we were not able to reproduce this error. The multiple-page refresh doesn't cause any problems.

Did you make any changes to our codebase?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



This that Any Possible Way to Upload Attachments to this ??



Hi Rakul,

You can upload your file to Google Drive and then send a link to the file here.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



https://drive.google.com/file/d/1Em7_ZW2lp7zYpb-PHBVABM_GT0Bhv6qr/view?usp=sharing

Steps to Reproduce Just Run the Project Locally and Go to
AsideDefault.tsx and AsideUserMenu.tsx Just Comment the aside footrer div and Just Save it continuously then see try to click settings icon and look it into dom the class name show and menu-dropdown not appending on while clicking the button .. I think the Component is Not Reinitiated again if something is changed

Hope Waiting For Your Response.. (:

Nothing is Modified in The Project is Just Fresh One



Hi,

Thank you for detailed instructions. We have reproduced this problem.

You can fix it by calling MenuComponent reinitialization inside your component.


MenuComponent.reinitialization();


Regards,
Lauris Stepanovs,
Keenthemes Support Team



in Onclick Function ? or just before the component returns ?



This is Not Working as Expected Kindly Provide Some alternative Solution for this i have tried this



Hi,

When you make changes to your component, it triggers a component rerender. As a result, the component loses its MenuComponent event listeners. This issue occurs only during development and should not affect production.

During development, you can resolve this by reinitializing the MenuComponent every time the component is rerendered. You can check an example in this gist.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



The Issue was Found in Production ( On Live Site ) Issue Raised Through Tester and finally I figured it out the issue but can't able to fix it kindly check once again through testing the project



Hi,

Can you reproduce this problem on our preview?
https://preview.keenthemes.com/metronic8/react/demo1/dashboard

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Can't able to find the issue but let me share my file gist



Hi,

Do you render your menu items asynchronously?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Still I am Facing this issue



Hi,

I guess the issue is related to your user object in the component, most likely you are fetching your object asynchronously which triggers menu component rerender.

I believe you can fix this with useEffect hook as shown below.


useEffect(() => {
MenuComponent.reinitialization();
}, [userObj]);


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(