Remove toggle all
This commit is contained in:
parent
bc6ead9dee
commit
be2d63497e
|
@ -17,16 +17,6 @@
|
|||
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 hidden = columns.filter(col => !col.visible).length
|
||||
return hidden ? `Columns (${hidden})` : "Columns"
|
||||
|
@ -69,10 +59,6 @@
|
|||
/>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<ActionButton on:click={() => toggleAll(true)}>Show all</ActionButton>
|
||||
<ActionButton on:click={() => toggleAll(false)}>Hide all</ActionButton>
|
||||
</div>
|
||||
</div>
|
||||
</Popover>
|
||||
|
||||
|
|
Loading…
Reference in New Issue