Sitelet https://web.archive.org/web/20260507153931/https://github.com/NativeScript/NativeScript/issues/8598
Skip to content

Property on custom components not working #8598

@surdu

Description

@surdu

Environment

tns info
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.5.0 version and is up to date.
✔ Component tns-core-modules has 6.5.1 version and is up to date.
✔ Component tns-android has 6.5.0 version and is up to date.
✔ Component tns-ios has 6.5.0 version and is up to date.

Describe the bug
After declaring a custom component with properties as described here, setting the property doesn't seem to work.

To Reproduce
Please see the playground example.

I have a custom component NumberSpinner with a property value that has the default value of default.

When I use this component in home-page.xml, even though I set the property value to test, the default value of the property is rendered.

Expected behavior
When setting the property, the new value is reflected in the rendering of the component.

Sample project
Playground example

Additional context
Tested on Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions