resolve merge conflicts

This commit is contained in:
Naegelin 2022-08-12 18:26:13 +02:00
commit 2b3a83b1c8
4 changed files with 29 additions and 4 deletions

View file

@ -4422,9 +4422,10 @@ None.
### Props ### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description | | Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :------------------ | :------- | :--------------- | :------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------- | | :------------------ | :------- | :--------------- | :------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| formatTotalSelected | No | <code>let</code> | No | <code>(totalSelected: number) => string</code> | <code>(totalSelected) => \`${totalSelected} item${totalSelected === 1 ? "" : "s"} selected\`</code> | Override the total items selected text | | formatTotalSelected | No | <code>let</code> | No | <code>(totalSelected: number) => string</code> | <code>(totalSelected) => \`${totalSelected} item${totalSelected === 1 ? "" : "s"} selected\`</code> | Override the total items selected text |
| active | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to show the toolbar regardless of row selection |
### Slots ### Slots

View file

@ -13672,6 +13672,18 @@
"isRequired": false, "isRequired": false,
"constant": false, "constant": false,
"reactive": false "reactive": false
},
{
"name": "active",
"kind": "let",
"description": "Set to `true` to show the toolbar regardless of row selection",
"type": "boolean",
"value": "false",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
"constant": false,
"reactive": false
} }
], ],
"moduleExports": [], "moduleExports": [],

View file

@ -10,6 +10,12 @@
export let formatTotalSelected = (totalSelected) => export let formatTotalSelected = (totalSelected) =>
`${totalSelected} item${totalSelected === 1 ? "" : "s"} selected`; `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected`;
/**
* Set to `true` to show the toolbar regardless of row selection
* @type {boolean}
*/
export let active = false;
import { onMount, getContext, createEventDispatcher } from "svelte"; import { onMount, getContext, createEventDispatcher } from "svelte";
import Button from "../Button/Button.svelte"; import Button from "../Button/Button.svelte";
@ -17,7 +23,7 @@
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
$: showActions = batchSelectedIds.length > 0; $: showActions = batchSelectedIds.length > 0 || active;
const ctx = getContext("DataTable"); const ctx = getContext("DataTable");

View file

@ -8,6 +8,12 @@ export interface ToolbarBatchActionsProps
* @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected` * @default (totalSelected) => `${totalSelected} item${totalSelected === 1 ? "" : "s"} selected`
*/ */
formatTotalSelected?: (totalSelected: number) => string; formatTotalSelected?: (totalSelected: number) => string;
/**
* Set to `true` to show the toolbar regardless of row selection
* @default false
*/
active?: boolean;
} }
export default class ToolbarBatchActions extends SvelteComponentTyped< export default class ToolbarBatchActions extends SvelteComponentTyped<