Remove toggle all
This commit is contained in:
parent
bc6ead9dee
commit
be2d63497e
|
@ -17,16 +17,6 @@
|
||||||
dispatch(visible ? "show-column" : "hide-column")
|
dispatch(visible ? "show-column" : "hide-column")
|
||||||
}
|
}
|
||||||
|
|
||||||
const toggleAll = async visible => {
|
|
||||||
let mutations = {}
|
|
||||||
$columns.forEach(column => {
|
|
||||||
mutations[column.name] = { visible }
|
|
||||||
})
|
|
||||||
datasource.actions.addSchemaMutations(mutations)
|
|
||||||
await datasource.actions.saveSchemaMutations()
|
|
||||||
dispatch(visible ? "show-column" : "hide-column")
|
|
||||||
}
|
|
||||||
|
|
||||||
const getText = columns => {
|
const getText = columns => {
|
||||||
const hidden = columns.filter(col => !col.visible).length
|
const hidden = columns.filter(col => !col.visible).length
|
||||||
return hidden ? `Columns (${hidden})` : "Columns"
|
return hidden ? `Columns (${hidden})` : "Columns"
|
||||||
|
@ -69,10 +59,6 @@
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
|
||||||
<ActionButton on:click={() => toggleAll(true)}>Show all</ActionButton>
|
|
||||||
<ActionButton on:click={() => toggleAll(false)}>Hide all</ActionButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue