mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
feat: custom show/hide datatable col
This commit is contained in:
@@ -32,6 +32,7 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
{
|
||||
accessorKey: 'created',
|
||||
size: 120,
|
||||
meta: { label: () => t('table.moderation.date') },
|
||||
header: ({ column }) => (
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -64,6 +65,7 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
accessorKey: 'type',
|
||||
size: 140,
|
||||
header: () => t('table.moderation.type'),
|
||||
meta: { label: () => t('table.moderation.type') },
|
||||
cell: ({ row }) => {
|
||||
const type = row.getValue('type');
|
||||
const typeKey = `view.moderation.filters.${type}`;
|
||||
@@ -79,7 +81,8 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
{
|
||||
accessorKey: 'sourceDisplayName',
|
||||
meta: {
|
||||
class: 'overflow-hidden'
|
||||
class: 'overflow-hidden',
|
||||
label: () => t('table.moderation.source')
|
||||
},
|
||||
size: 120,
|
||||
header: () => t('table.moderation.source'),
|
||||
@@ -100,7 +103,8 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
size: 200,
|
||||
minSize: 80,
|
||||
meta: {
|
||||
stretch: true
|
||||
stretch: true,
|
||||
label: () => t('table.moderation.target')
|
||||
},
|
||||
header: () => t('table.moderation.target'),
|
||||
cell: ({ row }) => {
|
||||
@@ -118,7 +122,8 @@ export const createColumns = ({ onDelete, onDeletePrompt }) => {
|
||||
{
|
||||
id: 'action',
|
||||
meta: {
|
||||
class: 'text-right'
|
||||
class: 'text-right',
|
||||
label: () => t('table.moderation.action')
|
||||
},
|
||||
size: 80,
|
||||
minSize: 80,
|
||||
|
||||
Reference in New Issue
Block a user