Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Property of hidden does not work in ProxyViewContainer #10912

@d8corp

Description

@d8corp

Issue Description

When I set ProxyViewContainer.hidden = true, content of the container still shown.

Expected behavior:

When I set ProxyViewContainer.hidden = true, the content should be hidden.

Reproduction

import { Application, Label, ProxyViewContainer, RootLayout } from '@nativescript/core'

Application.run({
  create: () => {
    const root = new RootLayout()
    const fragment = new ProxyViewContainer()
    const label1 = new Label()
    const label2 = new Label()

    label1.text = 'Label 1'
    label2.text = 'Label 2'

    fragment.addChild(label1)
    fragment.addChild(label2)
    fragment.hidden = true

    root.addChild(fragment)
    return root
  },
})

Relevant log output (if applicable)

Environment

OS: macOS 26.0.1
CPU: (8) arm64 Apple M1
Shell: /bin/zsh
node: 22.21.0
npm: 10.9.4
nativescript: 8.9.3

# android
java: Not Found
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 26.0.1/17A400
cocoapods: 1.16.2
python: Not Found
python3: 3.11.5
ruby: 3.4.7
platforms: 
  - DriverKit 25.0
  - iOS 26.0
  - macOS 26.0
  - tvOS 26.0
  - visionOS 26.0
  - watchOS 26.0

Dependencies

"dependencies": {
  "@innet/jsx": "^2.0.0-rc.1",
  "@innet/utils": "^2.0.0-alpha.1",
  "@nativescript/core": "~8.9.0",
  "@nativescript/theme": "^3.1.0",
  "innet": "^2.0.0-alpha.3",
  "watch-state": "^3.5.0-alpha.3"
},
"devDependencies": {
  "@nativescript/ios": "8.9.5",
  "@nativescript/types": "~8.9.1",
  "@nativescript/webpack": "~5.0.0",
  "@typescript-eslint/eslint-plugin": "^5.60.0",
  "@typescript-eslint/parser": "^5.60.0",
  "eslint": "^8.43.0",
  "eslint-config-standard": "^17.1.0",
  "eslint-config-standard-jsx": "^11.0.0",
  "eslint-config-standard-with-typescript": "^35.0.0",
  "eslint-plugin-import": "^2.27.5",
  "eslint-plugin-n": "^15.7.0",
  "eslint-plugin-promise": "^6.1.1",
  "eslint-plugin-simple-import-sort": "^10.0.0",
  "eslint-plugin-unused-imports": "^4.1.4",
  "ts-loader": "^9.5.4",
  "typescript": "~5.4.0"
}

Please accept these terms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-pending-triageReported bug, pending triage to confirm.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions