supabase / ui

Supabase UI Library

Home Page:ui-storybook-pre-release.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Controlled InputNumber Chevron Up & Down event handling question.

yumyo opened this issue · comments

Bug report

Describe the bug

While using the InputNumber component as a controlled component, clicking on the Chevron Up or Chevron Down icons does not fire an onChange event, but using the arrow keys inside the input does.

To Reproduce

The same can be observed in StoryBook.
https://ui-storybook-pre-release.vercel.app/?path=/story/data-input-inputnumber--controlled

  1. Go to the StoryBook link above
  2. Click on the chevrons
  3. Use arrow keys inside the input instead

Expected behaviour

Using the chevrons should be the same same as using arrow keys.

System information

  • "@supabase/ui": "^0.36.5",

Hi @yumyo,

Looking at the component InputNumber their is a onChange function which is using the react hook useCallback to reduce the amount of re-renders for the component and this is why you do not see an event being logged.

Thank you @Hallidayo I can see the useCallback in the storybook story, but not the actual component. Also, it still does not explain why this is not the case for onKeyDown, or if you just type a new number in the input but only when trying to use the chevrons.
I see the code is changing tho. I have tried using the latest v0.37.0-beta.8, but for some reason, now I see no chevrons at all :D I guess I must first check what's going on with my setup.

Supabase UI is being deprecated.

As part of that, we are closing Pull Requests in this repo for now.

If you'd like to still make these changes, you could consider making these changes in https://github.com/supabase/supabase/tree/master/packages/ui


We are moving the components to the main mono repo at https://github.com/supabase/supabase.

The auth component has been moved to it's own repo and package. https://github.com/supabase-community/auth-ui. You can also read the docs for auth ui here.