Add hide column option to header cell menu
This commit is contained in:
parent
128411a61b
commit
45ac7d1850
|
@ -93,6 +93,16 @@
|
||||||
columns.actions.changePrimaryDisplay(column.name)
|
columns.actions.changePrimaryDisplay(column.name)
|
||||||
open = false
|
open = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hideColumn = () => {
|
||||||
|
columns.update(state => {
|
||||||
|
const index = state.findIndex(col => col.name === column.name)
|
||||||
|
state[index].visible = false
|
||||||
|
return state.slice()
|
||||||
|
})
|
||||||
|
columns.actions.saveChanges()
|
||||||
|
open = false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -184,6 +194,7 @@
|
||||||
<MenuItem disabled={!canMoveRight} icon="ChevronRight" on:click={moveRight}>
|
<MenuItem disabled={!canMoveRight} icon="ChevronRight" on:click={moveRight}>
|
||||||
Move right
|
Move right
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem icon="VisibilityOff" on:click={hideColumn}>Hide column</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue