[BUG] - NumberInput doesn't set the label placement provided in HeroUIProvider
HeroUI Version
2.8.5
Describe the bug
<HeroUIProvider labelPlacement={"outside"} >
<div> <Input isRequired name={"total"} placeholder="Enter amount" label={"Total amount"} aria-label="Total" value={value} onValueChange={setValue} isClearable /> </div>
<div> <NumberInput isRequired name={"total"} placeholder="Enter amount" label={"Total amount"} aria-label="Total" value={value} onValueChange={setValue} isClearable /> </div>
When passing the labelPlacement manually it does work as expected
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Create a number input and provide the labelPlacement in HeroUIProvider
Expected behavior
should use the provided labelPlacment from HeroUIProivder
Screenshots or Videos
No response
Operating System Version
MacOS
Browser
Safari
I'm wondering if you swapped two screenshots?
No the first one is the normal input, where the label is automatically placed outside.
The second one is the number input where this doesn't happen automatically. I can set it manually by passing labelplacent="outside"
Ah got it now. Thought <HeroUIProvider labelPlacement={"outside"} > is only for the first example. Will take a look. Thanks for reporting.
@wingkwong can I work on this one?
@villAsh go ahead
@villAsh Any progress so far?
@Stybo I tried a few things but due to some work reason will not be able to work on this.
Hey @wingkwong, can you please unassign this?
@villAsh any findings you can share?
If nobody is working on this bug, can I take it? :)
@KumJungMin go ahead
@villAsh any findings you can share?
I was exploring the number-input file and discovered that it is related to use-label-placement hook.
Inside of use-label-placement hook we are passing the labelPlacement prop and we are doing a check that if it is null then only take the global label placement, but the thing is that it might not be null...
this is what I've discovered so far.
Good job @KumJungMin! @wingkwong When will this be available?