[CB] Ability to pin column in the Data Editor#3794
Conversation
…s data-grid api of getting sorted columns
| $color-negative: hsl(0, 95%, 65%); | ||
| $color-status: #a08600; | ||
|
|
||
| $color-add-status: #65974c; |
There was a problem hiding this comment.
I’m not sure these tokens should be here, since they’re scoped to specific grid behavior, while core theming is meant for shared concepts like negative and positive colors, etc. I suggest to move it to data spread sheet plugin
There was a problem hiding this comment.
moved to layer styles of data grid component
| const tableData = useTableData(model as unknown as IDatabaseDataModel<ResultSetDataSource>, resultIndex, dataGridDivRef); | ||
| const gridSelectionContext = useGridSelectionContext(tableData, selectionAction); | ||
|
|
||
| const pinColumn = useCallback((colIdx: IGridColumnKey) => { |
There was a problem hiding this comment.
I think its better to move logic with pinnedColumns state and setters to separate hook because data grid table is quite large and i dont see the point of keeping this helpers here. What do you think?
usePinnedColumns or something else
There was a problem hiding this comment.
good idea! component became quite big so moved the logic into the hook
| * Licensed under the Apache License, Version 2.0. | ||
| * you may not use this file except in compliance with the License. | ||
| */ | ||
| @layer Components { |
There was a problem hiding this comment.
should be components from small letter c
closes https://github.com/dbeaver/pro/issues/6859
Changes:
visual column ID, some need to usedataColIdx. So used it respectively where required