Skip to content

Commit

Permalink
fix: custom list value deletion was broken
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Pascal-Delange committed Apr 3, 2024
1 parent fa66924 commit 626dcf3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/app-builder/src/routes/_builder+/lists+/$listId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export const handle = {
i18n: ['lists', 'common'] satisfies Namespace,
};

type ListValues = {
type CustomListValue = {
id: string;
value: string;
};

const columnHelper = createColumnHelper<ListValues>();
const columnHelper = createColumnHelper<CustomListValue>();

export default function Lists() {
const customList = useLoaderData<typeof loader>();
Expand All @@ -63,16 +63,15 @@ export default function Lists() {
size: 500,
sortingFn: 'text',
enableSorting: true,
cell: ({ getValue }) => {
cell: ({ getValue, row }) => {
const value = getValue();
return (
<div className="group flex items-center justify-between">
<p className="text-grey-100 text-s font-medium">{value}</p>

{canManageListItem ? (
<DeleteListValue
listId={customList.id}
listValueId={value}
listValueId={row.original.id}
value={value}
>
<button
Expand Down

0 comments on commit 626dcf3

Please sign in to comment.