Skip to content

Commit

Permalink
Merge pull request #323 from nginformatica/feat/implements-options-in…
Browse files Browse the repository at this point in the history
…-dataTable

feat: implements options in dataTable
  • Loading branch information
renanponick authored Sep 7, 2023
2 parents c537a8a + ab27380 commit ff1daa2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flipper-ui",
"version": "0.29.6",
"version": "0.29.7",
"description": "",
"main": "dist/index.js",
"homepage": "https://flipper-ui.ngi.com.br/",
Expand Down
1 change: 1 addition & 0 deletions src/core/data-display/data-table/rows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const renderEditMode = <D extends Data>(

return (
<TextField
options={column.options}
defaultValue={value}
type={type}
fullWidth
Expand Down
2 changes: 2 additions & 0 deletions src/core/data-display/data-table/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IOption } from '@/core/inputs/text-field'
import type { CSSProperties, FunctionComponent } from 'react'

export type RecordUnknown = Record<string, unknown>
Expand Down Expand Up @@ -43,6 +44,7 @@ interface ColumnSpecDefault<D extends Data>
type: ColumnType
field: keyof D
editable?: boolean
options?: string | IOption[]
getValue?(value: unknown): string
}

Expand Down
1 change: 0 additions & 1 deletion src/core/inputs/text-field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export interface IOption {
name?: string
disabled?: boolean
value: string | number
options?: IOption[]
}

export interface TextFieldProps
Expand Down

0 comments on commit ff1daa2

Please sign in to comment.