Skip to content

Commit

Permalink
feat: extend config on form/table provider
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo-battista committed Feb 12, 2024
1 parent 13b1a58 commit 0cc0ecc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/AppFormConfigProvider/AppFormConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ export default function AppFormConfigProvider(props: { children: ReactNode }) {
onChange={(e) => field.onChange(e.target.value)}
/>
),
datetime: ({ field }) => (
<Input
{...field}
type="datetime"
fullWidth
onChange={(e) => field.onChange(e.target.value)}
/>
),
string: ({ field }) => {
if (field.values && field.values.length > 0)
return (
Expand Down
2 changes: 2 additions & 0 deletions components/Table/AppTableConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const AppTableConfigProvider = ({ children }: { children: ReactNode }) => {
</>
);
},
// TODO: types
list: (value: any) => <Json value={JSON.stringify(value)} />,
// TODO: we have to extend table with link
// @ts-ignore
link: (value) => (
Expand Down

0 comments on commit 0cc0ecc

Please sign in to comment.