Skip to content

Please add edit_readonly function similar to edit_constant #379

@MarcSkovMadsen

Description

@MarcSkovMadsen

My Pain

I'm trying to contribute a new Location widget to panel. Some of the parameters on this widget should be readonly but still be updated when the value of the corresponding Bokeh typescript model changes it value.

In order to enable this i need to set the parameters in code on the python side but this raises a TypeError.

If I change the parameters from readonly to constant then i can use the param.edit_constant contextmanager.

But the parameters should really be readonly.

Solution

Add a param.edit_readonly manager similar to the param.edit_constant manager.

Alternatively change param.edit_constant to a param.edit_constant_or_readonly manager.

Additional Context

For now I can just solve my problem in my own code by using an adjusted version of the below code.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions