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

[BUG] @prizm-ui/components - <prizm-tab> ошибка свойство [content] #841

Closed
1 of 9 tasks
if1t opened this issue Oct 19, 2023 · 1 comment
Closed
1 of 9 tasks
Assignees
Labels
estimate:sp2 priority:high level of urgency - high state:ready ready for release (pass tested) type:bug Something isn't working version:3 version:4
Milestone

Comments

@if1t
Copy link

if1t commented Oct 19, 2023

Библиотека

Выберите нужное отметив галочку [x]

  • @prizm-ui/core
  • @prizm-ui/components
  • @prizm-ui/install
  • @prizm-ui/icons
  • @prizm-ui/flag-icons
  • @prizm-ui/theme
  • @prizm-ui/charts
  • @prizm-ui/ast
  • @prizm-ui/nx-plugin

Компонент

prizm-tab

Версия

Операционная ситема:

Windows 10, etc

Браузер:

Google Chrome Версия 96.0.4664.110 (Официальная сборка), (x86_64)

NodeJS:

➜ node --version
v16.20.2

Dependencies:

➜ npm ls @prizm-ui/components

@prizm-ui/components 3.1.0
➜ npm ls @angular/core

@prizm-ui/[email protected]
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├── @angular/[email protected]
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @angular/[email protected]
│ └── @angular/[email protected] deduped
├─┬ @storybook/[email protected]
│ └── @angular/[email protected] deduped
├─┬ [email protected]
│ └── @angular/[email protected] deduped
└─┬ [email protected]
  └── @angular/[email protected] deduped


Описание проблемы

Ошибка при воспроизведении примера для свойства [content] компонента : Type string | number | undefined is not assignable to type PolymorphContent<PrizmTabContext> | null

https://doc.prizm.zyfra.com/components/tabs

example.component.ts:

import { Component, ChangeDetectionStrategy } from '@angular/core';
import { PrizmTabItem } from '@prizm-ui/components';

@Component({
	selector: 'prizm-tabs-example-basic',
	templateUrl: './tabs-example-basic.component.html',
	styleUrls: ['./tabs-example-basic.component.less'],
	changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TabsExampleBasicComponent {
	public tabs: PrizmTabItem[] = [
            {
              title: 'Вкладка 1',
            },
            {
              title: 'Вкладка 2',
            },
            {
              title: 'Вкладка 3',
            },
        ];
}

example.component.html:

<div class="container">
  <prizm-tabs>
    <prizm-tab *ngFor="let item of tabs" [content]="item.title" [type]="'line'">
    </prizm-tab>
  </prizm-tabs>
</div>
@alexhawkins94 alexhawkins94 added the type:bug Something isn't working label Oct 19, 2023
@ickisIckis
Copy link
Collaborator

Необходимо избавиться от $any() в коде.

@ickisIckis ickisIckis added the priority:high level of urgency - high label Feb 6, 2024
@ickisIckis ickisIckis modified the milestones: 4.3.0, 4.2.0 Feb 6, 2024
@imonogarov imonogarov modified the milestones: 4.2.0, 4.4.0 May 24, 2024
@ZurabDev ZurabDev modified the milestones: 4.4.0, 4.3.2 Jun 5, 2024
@ZurabDev ZurabDev added the state:ready ready for release (pass tested) label Jun 7, 2024
ickisIckis added a commit that referenced this issue Jun 13, 2024
fix(docs/tab): remove $any from basic example #841
ZurabDev added a commit that referenced this issue Jun 13, 2024
fix(docs/tab): remove $any from basic example #841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:sp2 priority:high level of urgency - high state:ready ready for release (pass tested) type:bug Something isn't working version:3 version:4
Projects
Status: Done
Development

No branches or pull requests

5 participants