Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix results per page functionality #603

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/components/Controllers/File/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function File() {
}}
>
<Menu />
<ScrollBox sx={{ flexGrow: 1 }}>
<ScrollBox sx={{ flexGrow: 1, zIndex: 10 }}>
<View />
</ScrollBox>
<Panel />
Expand Down
2 changes: 1 addition & 1 deletion client/components/Controllers/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Table() {
}}
>
<Menu />
<ScrollBox sx={{ flexGrow: 1 }}>
<ScrollBox sx={{ flexGrow: 1, zIndex: 10 }}>
<Editor />
</ScrollBox>
<Panel />
Expand Down
2 changes: 1 addition & 1 deletion client/components/Controllers/Text/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Text() {
}}
>
<Menu />
<Box sx={{ flexGrow: 1 }}>
<Box sx={{ flexGrow: 1, zIndex: 10 }}>
<Editor />
</Box>
<Panel />
Expand Down
5 changes: 3 additions & 2 deletions client/components/Editors/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default function TableEditor(props: TableEditorProps) {
[schema, report, history, selection]
)
const [rowsPerPage, setRowsPerPage] = React.useState(20)
const [userRowsPerPage, setUserRowsPerPage] = React.useState<number | undefined>()

const [rowHeight] = React.useState(40)

Expand Down Expand Up @@ -105,8 +106,8 @@ export default function TableEditor(props: TableEditorProps) {
renderLoadMask={LoadMask}
defaultActiveCell={settings.DEFAULT_ACTIVE_CELL}
style={{ height: '100%', border: 'none' }}
limit={rowsPerPage}
onLimitChange={setRowsPerPage}
limit={userRowsPerPage || rowsPerPage}
onLimitChange={setUserRowsPerPage}
rowHeight={rowHeight}
showColumnMenuLockOptions={false}
showColumnMenuGroupOptions={false}
Expand Down
3 changes: 2 additions & 1 deletion client/store/actions/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export function stopTableEditing() {

requestAnimationFrame(() => {
store.setState('stop-table-editing', (state) => {
state.table!.initialEditingValue = undefined
if (!state.table) return
state.table.initialEditingValue = undefined
})
})

Expand Down
Loading