Skip to content

Update TagPicker docs. #144

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
25 changes: 2 additions & 23 deletions src/en/developer-guide/applications/controls/tagpicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The Tag Picker component extends the `Lookup` component from the `@talxis/base-c
| Property Name | Type | Description |
|-------------------------------|-----------------|------------------------------------------------------------------------|
| Binding | SingleLine.Text | Binding field. It is used for data exchange when Tag Picker is nested. |
| Allocated Height | Whole.None | |
| Entity Name | SingleLine.Text | Target entity name for filtering tag instances. |
| Record Id | SingleLine.Text | Target record id for filtering tag instances |
| Scope Entity Name | SingleLine.Text | Scoping entity name for filtering tags. |
| Scope Record Id | SingleLine.Text | Scoping record id for filtering tags. |
| Output Selected Tag Instances | Enum | Select yes to ouput data to binding field. |
| Compact Mode | Enum | Select yes to display pcf in compact mode. |
| Enable Navigation | Enum | Select yes to make tags clickable for editing purposes. |

## Lookup Behavior Differences

Expand All @@ -45,33 +45,12 @@ Selected tag instances can be retrieved in two ways:
}
```

## Nested PCF and Context Updates

When used as a nested PCF, the component exposes an update view method via CustomEvent on intial render. This enables updating the context dynamically. The event is dispatched on the div container pass in the PCF init method and bubbling up for you to catch it in parent PCF. Below is the event definition:

```typescript
const event = new CustomEvent(
'talxis_onPcfUpdateView',
{
detail: {
pcfName: 'talxis_TALXIS.PCF.TagPicker',
id: this._targetRecord.recordId,
onPcfUpdateView: this._onPcfUpdateView.bind(this),
context: this._context,
bubbles: true,
},
}
);
```

## Compact Mode

For grid implementations, compact mode is available. This mode:

- Displays only the selected tags initially.
- Hides tags when the input gains focus and replaces them with a search bar.
- Shows a single tag, hiding others under an expand button when multiple tags exist.
- Displays tags dynamically. Tries to show all tags with their full names. If that is not possible, it displays as many tags as possible using the first letter of tag name, hiding the rest under an expand button.

![Compact Mode 1](/.attachments/applications/Controls/TagPicker/tagpicker-compactmode-1.png)

![Compact Mode 2](/.attachments/applications/Controls/TagPicker/tagpicker-compactmode-2.png)