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

docs(chip): remove duplicated dragging section #5999

Open
wants to merge 11 commits into
base: vnext
Choose a base branch
from
15 changes: 0 additions & 15 deletions en/components/chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,6 @@ public chipRemoved(event: IBaseChipEventArgs) {
this.changeDetectionRef.detectChanges();
}
```

### Dragging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see duplicate section of this one. We'll lose this content if removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chip draggable property is also mentioned in the Reorder Chips section

Copy link
Contributor

@dkamburov dkamburov Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added @skrustev for a review, he can tell if this section was added for a reason

Copy link
Member

@skrustev skrustev Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine for the section to be left as is. It is mentioned with the Chip Area, but it is a standalone thing to the chip itself. The part describing the demo though should definitely be somewhere else imo. I think moving it to a separate section after the Chip Templates section should suffice.

I noticed though the draggable link points to the removable property.
Also I think having a link to the Chip Area Reorder Chips section here would also be nice. The IgxChipsAreaComponent note says it is needed, but that is not required. The user could implement its own thing even without the Chip Area. So I think mentioning it as an option with the link to the Reorder Chips would be much better replacement for the note.


Dragging can be enabled by setting the [`draggable`]({environment:angularApiUrl}/classes/igxchipcomponent.html#removable) input to `true`. When enabled, you can click and drag the chip around.

```html
<igx-chip *ngFor="let chip of chipList" [id]="chip.id" [draggable]="true">
<igx-icon igxPrefix>{{chip.icon}}</igx-icon>
{chip.text}}
</igx-chip>
```

>[!NOTE]
>To reorder the chips you need to handle the event using the [`IgxChipsAreaComponent`]({environment:angularApiUrl}/classes/igxchipsareacomponent.html).

<div class="divider"></div>

**To create the demo sample, we will use the features above:**
Expand Down
14 changes: 0 additions & 14 deletions jp/components/chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,6 @@ public chipRemoved(event: IBaseChipEventArgs) {
}
```

### ドラッグ

ドラッグは、[`draggable`]({environment:angularApiUrl}/classes/igxchipcomponent.html#removable) 入力を `true` に設定して有効にできます。有効にすると、チップをクリックしてドラッグできます。

```html
<igx-chip *ngFor="let chip of chipList" [id]="chip.id" [draggable]="true">
<igx-icon igxPrefix>{{chip.icon}}</igx-icon>
{chip.text}}
</igx-chip>
```

>[!NOTE]
>チップの順序をソートするには、[`IgxChipsAreaComponent`]({environment:angularApiUrl}/classes/igxchipsareacomponent.html) を使用してイベントを処理する必要があります。

<div class="divider"></div>

**デモ サンプルを作成するには、上記の機能を使用します。**
Expand Down
Loading