-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: filtering and grouping collapsed (#652)
* fix: the issues with the checkbox field's filtering and grouping collapse * fix: grouping collapsed error for the date field * chore: update e2e test * fix: checkbox field rendering * fix: the isNot operator for filtering the date field is adapted for sqlite
- Loading branch information
Showing
14 changed files
with
81 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 22 additions & 3 deletions
25
packages/sdk/src/components/cell-value-editor/ComputedEditor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
import { CellValueType } from '@teable/core'; | ||
import { Input } from '@teable/ui-lib'; | ||
import type { Field } from '../../model'; | ||
import { CellCheckbox } from '../cell-value/cell-checkbox'; | ||
|
||
export const ComputedEditor = (props: { cellValueString?: string }) => { | ||
const { cellValueString } = props; | ||
interface IComputedEditorProps { | ||
field: Field; | ||
cellValue: unknown; | ||
} | ||
|
||
return <Input className="h-8 disabled:cursor-text" value={cellValueString} disabled />; | ||
export const ComputedEditor = (props: IComputedEditorProps) => { | ||
const { field, cellValue } = props; | ||
const { cellValueType } = field; | ||
|
||
if (cellValueType === CellValueType.Boolean) { | ||
return <CellCheckbox value={cellValue as boolean | boolean[]} itemClassName="size-6" />; | ||
} | ||
|
||
return ( | ||
<Input | ||
className="h-8 disabled:cursor-text" | ||
value={field.cellValue2String(cellValue)} | ||
disabled | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters