Property of hidden does not work in ProxyViewContainer

Đang mở
#10,912 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu bằng cách xác định cách triển khai ProxyViewContainer và cách thuộc tính hidden của nó được áp dụng cho nội dung con. Sau đó, tái hiện ví dụ TypeScript từ issue và xác minh rằng việc đặt hidden thành true sẽ ẩn các label của container.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug-pending-triage
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
Ngôn ngữ chính
TypeScript
Star
25.7k
Fork
1.7k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
35

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NativeScript/NativeScript

Tất cả issue của NativeScript/NativeScript

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.