The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

Metronic React wizard not working correctly

I bought the Metronic template for the React version. The wizard is not working correctly when data-kt-stepper-action="step" is used. This should make the steps clickable but this doesn't work.

I place the attribute like it is also used in the HTML template.

if i look at the _StepperComponent.ts source code:

<pre> DOMEventHandlerUtil.on(this.element, '[data-kt-stepper-action="step"]', 'click', (e: Event) => { e.preventDefault() if (this.steps && this.steps.length > 0) { for (let i = 0; i < this.steps.length; i++) { if ((this.steps[i] as HTMLElement) === this.element) { let index = i + 1 const stepDirection = this._getStepDirection(index) EventHandlerUtil.trigger(this.element, `stepper.${stepDirection}`, e) return } } } }) </pre>

This can never work as <code>this.steps[i] as HTMLElement) === this.element</code> will never be true.

Can you guys make a bugfix for this?

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)

 
Deleted comment
 
Deleted comment
 
Deleted comment
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment

Hi,

We will check this issue in more detail, could you please specify which stepper example you are trying to reuse in React version?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



It's both wizard / stepper examples that doesn't matter.

I wrote a fix myself which is located in _StepperComponent.ts and _DOMEventHandlerUtil.ts

I also found another bug related to the wizard in DomHelpers.ts: getElementIndex which I also fixed (but hacky now).

To which email address can I send the fixes so you can do a compare yourself



Hi,

Thank you for your message, good catch.
I've added the bug ticket to our development backlog, we will fix it in the next release.

If you want to share your solution you can describe your fix here in the comments below.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



this is the html from the first block. Need to paste it here as the site gives an error if i edit the question.


div className="stepper-item current" data-kt-stepper-element="nav" data-kt-stepper-action="step"


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.