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

fix(components): fix column picker vue examples #1293

Merged
merged 1 commit into from
Sep 21, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ unlike the `toggle`, which renders the same `item` slot defined by default.

#### Default usage

```vue
```vue live
<template>
<BaseColumnPickerDropdown v-model="selectedColumns" :columns="[2, 4, 6]">
<template #item="{ item, isSelected, isHighlighted }">
Expand Down Expand Up @@ -127,7 +127,7 @@ unlike the `toggle`, which renders the same `item` slot defined by default.

#### Customizing toggle button

```vue
```vue live
<template>
<BaseColumnPickerDropdown v-model="selectedColumns" :columns="[2, 4, 6]">
<template #toggle="{ item, isOpen }">Selected: {{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>
Expand Down Expand Up @@ -162,7 +162,7 @@ The component emits an X Event, `UserClickedColumnPicker`, on column change and
that event from outside, so you don't need to store the current column value to keep it synchronized
with other column pickers.

```vue
```vue live
<template>
<BaseColumnPickerDropdown :columns="[2, 4, 6]">
<template #toggle="{ item, isOpen }">Selected: {{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ number of columns that it is being selected when it is clicked.

It is required to send the columns prop.

```vue
```vue live
<template>
<BaseColumnPickerList :columns="columns" />
</template>
Expand All @@ -124,7 +124,7 @@ It is required to send the columns prop.
It is possible to do two way binding in order to synchronize the value with the parents. It will be
updated if it changed the value or if the parent changes it.

```vue
```vue live
<template>
<BaseColumnPickerList :columns="columns" v-model="selectedColumns" />
</template>
Expand All @@ -148,7 +148,7 @@ updated if it changed the value or if the parent changes it.

It is possible to override the column picker button content.

```vue
```vue live
<template>
<BaseColumnPickerList :columns="columns" #default="{ column, isSelected }">
<span>{{ column }} {{ isSelected ? '🟢' : '' }}</span>
Expand All @@ -171,7 +171,7 @@ It is possible to override the column picker button content.
It is also possible to add a divider element between the column picker buttons by overriding the
`divider` slot.

```vue
```vue live
<template>
<BaseColumnPickerList :columns="columns">
<template #divider>
Expand All @@ -198,7 +198,7 @@ It is also possible to add a divider element between the column picker buttons b

The `buttonClass` prop can be used to add classes to the buttons.

```vue
```vue live
<template>
<BaseColumnPickerList :columns="columns" buttonClass="x-button--round" />
</template>
Expand Down
Loading