-
Notifications
You must be signed in to change notification settings - Fork 398
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
CB-5052 [2562 FR] Highlight the row where any field is currently selected #2952
CB-5052 [2562 FR] Highlight the row where any field is currently selected #2952
Conversation
…-field-is-currently-selected
function hasSelectedInRow(rowIdx: number) { | ||
return props.selectionAction.getFocusedElement()?.row.index === rowIdx; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename selected to focused, also seems like it's better to expose computed like focused element and in cell / header renderers use this information to detect if current cell / header is focused.
Also please note, that selectionAction.getFocusedElement()
's column / row is not the same as column.idx
/ rowIdx
index in data grid you need to use cell (https://github.com/dbeaver/cloudbeaver/pull/2952/files#diff-064428d02a72e78faffcf66fbd166bc59e9692a8fb55ccf92565cc00ef13a62cR43)
…-field-is-currently-selected
const dark = (await import('./dark.module.scss')).default; | ||
const light = (await import('./light.module.scss')).default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had preloaded all styles at one time, cause the theme did not apply until <TableGrid>
component was fully rerendered (reload page or tab)
|
||
@import '@cloudbeaver/core-theming/src/styles/theme-dark'; | ||
|
||
:global .#{$theme-class} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We deleted these files on purpose, we dont want to use them anymore. We should define all styles in DataGridTable.module.css. Probably we want to add light-dark() postcss mixin or something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rolled back changes, so we don't have a themed data grid. It is not required for now
background-color: #2a7cb4; | ||
background-color: var(--theme-primary); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theme may be unavailable in this component, please keep inlined styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…-field-is-currently-selected
…-field-is-currently-selected
…-field-is-currently-selected
No description provided.