rename show to active

This commit is contained in:
Naegelin 2022-08-12 10:18:37 +02:00
commit 8820435041

View file

@ -10,14 +10,14 @@
* Set to `true` to show the toolbar regardless of row selection * Set to `true` to show the toolbar regardless of row selection
* @type {boolean} * @type {boolean}
*/ */
export let show = false; export let active = false;
import { onMount, getContext } from "svelte"; import { onMount, getContext } from "svelte";
import Button from "../Button/Button.svelte"; import Button from "../Button/Button.svelte";
let batchSelectedIds = []; let batchSelectedIds = [];
$: showActions = batchSelectedIds.length > 0 || show; $: showActions = batchSelectedIds.length > 0 || active;
const ctx = getContext("DataTable"); const ctx = getContext("DataTable");
const unsubscribe = ctx.batchSelectedIds.subscribe((value) => { const unsubscribe = ctx.batchSelectedIds.subscribe((value) => {