formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Tabs component - crashes with "addHotKeys is not a function" error #250

Closed ashwinibm closed 1 month ago

ashwinibm commented 2 months ago

Describe the bug I run into a addHotKeys is not a function error when I use the Tabs component.

To Reproduce I'm using the example from the docs within my application.

<Tabs>
  <Tabs.List>
    <Tabs.Item value="1">
      Item 1
    </Tabs.Item>
    <Tabs.Item value="2">
      Long item 2
    </Tabs.Item>
    <Tabs.Item value="3">
      Very long item 3
    </Tabs.Item>
  </Tabs.List>

  <Tabs.Panel value="1">Tab 1</Tabs.Panel>
  <Tabs.Panel value="2">Tab 2</Tabs.Panel>
  <Tabs.Panel value="3">Tab 3</Tabs.Panel>
</Tabs>

Expected behavior Tabs should render.

Screenshots

Screenshot 2024-05-03 at 6 11 46 PM

Environment (please complete the following information):

Additional context A lot of the other Reshaped components render and seem to be working just fine in the same part of the application.

blvdmitry commented 2 months ago

Hi, can you make sure your application is wrapped with the Reshaped provider? It handles all hotkeys within the app so components relying on hotkeys are using its context

ashwinibm commented 1 month ago

Hi, can you make sure your application is wrapped with the Reshaped provider? It handles all hotkeys within the app so components relying on hotkeys are using its context

This worked. Thank you!