widgetti / widgetti/ipyvuetify
ipyvuetify.Select component returns empty {} data when selecting item with value: 0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 355
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
When using the Select component from ipyvuetify, selecting an item with value: 0 in the list of items results in an empty {}object being sent as data in the on_select callback. This behavior is unexpected, as I would expect the data parameter to contain the selected item information, similar to selections with non-zero values.
Steps to Reproduce:
Define a list of items with at least one item having value: 0, such as:
items = [{'text': 'Value 0', 'value': 0}, {'text': 'Value 1', 'value': 1}, {'text': 'Value 2', 'value': 2}]
Create a Select component with this items list:
import ipyvuetify as v
def on_select(widget, event, data):
print("data at on_select", data)
select = v.Select(v_model=[], items=items)
select.on_event('change', on_select)
Select the item with value: 0 and observe the output from on_select
data at on_select {}
data at on_select 1
data at on_select 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Select and on_event reproduction with an item whose value is 0, then trace the Select change-event handling that assembles the callback data. Done means selecting value 0 supplies the selected item information rather than an empty object, while existing non-zero selections continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100