There are a number of components that define label prop as Element | None. That does not allow a str or other primitive types. In Spectrum though, they accept a ReactNode which does accept a string, number, boolean, etc.
Some components with incorrect typing:
combo_box
date_field
date_picker
date_range_picker
picker
progress_bar
time_field
I'm pretty sure all of these can accept text and other primitives. Should be verified.
Steps to reproduce
Enter the following snippet in a code editor:
from deephaven import ui
p = ui.picker("Hello", "World", label="Picker label")
**Expected results**
1. There should be no type hint errors
**Actual results**
1. There is a type error reported (though running the code does work okay):
![image](https://github.com/user-attachments/assets/97973433-59a3-44d6-bf89-a818f9198504)
**Versions**
Engine Version: 0.36.1
Web UI Version: 0.97.0
Java Version: 11.0.24
Barrage Version: 0.6.0
Browser Name: Firefox 131
OS Name: Linux
matplotlib: 0.0.0
plotly-express: 0.0.0
auth-keycloak: 0.0.0
ui: 0.0.0
example-theme: 0.0.0
Description
There are a number of components that define
label
prop asElement | None
. That does not allow astr
or other primitive types. In Spectrum though, they accept aReactNode
which does accept astring
,number
,boolean
, etc.Some components with incorrect typing:
I'm pretty sure all of these can accept text and other primitives. Should be verified.
Steps to reproduce
p = ui.picker("Hello", "World", label="Picker label")