Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning new label value to filedownload widget concatenates the value to previous value #7294

Open
oggers opened this issue Sep 18, 2024 · 0 comments
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@oggers
Copy link

oggers commented Sep 18, 2024

Hi,

I'm just upgrading to panel 1.5.0, but this bug appeared in version 1.4.5 (1.4.4 was ok).

The problem is that when you update the value of the FileDownload label attribute with a different value as the previous one the value is concatenated to the previous value, but if you update it with the same value nothing happens.

To reproduce it use the following snippet (tested in jupyter):


import panel as pn

pn.extension()

download = pn.widgets.FileDownload()
download.label = 'Label 0'

def change_label_1(event):
    download.label = 'Label 1'

def change_label_2(event):
    download.label = 'Label 2'


button_1 = pn.widgets.Button(name='Change label 1')
button_1.on_click(change_label_1)

button_2 = pn.widgets.Button(name='Change label 2')
button_2.on_click(change_label_2)

pn.Column(download, button_1, button_2).show()```

After clicking [Change label 1] -> [Change label 1] -> [Change label 2] -> [Change label 1] -> [Change label 2] it shows:

bug

Note that even if I clicked [Change label 1] two consecutive times it only shows up one time.

Thank you.

@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Sep 18, 2024
@philippjfr philippjfr added this to the v1.5.1 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

3 participants