Compare commits

..

No commits in common. "af68d6d37744265bfa54ce0020eb0c4d58dadb01" and "d0911d842acdbd43b03e268803eb2a9e2e72565d" have entirely different histories.

3 changed files with 101 additions and 102 deletions

View File

@ -1,11 +1,5 @@
# @warkypublic/zustandsyncstore # @warkypublic/zustandsyncstore
## 0.0.5
### Patch Changes
- d7f4d0d: Fixed spreaing of grid props
## 0.0.4 ## 0.0.4
### Patch Changes ### Patch Changes

View File

@ -1,7 +1,7 @@
{ {
"name": "@warkypublic/oranguru", "name": "@warkypublic/oranguru",
"author": "Warky Devs", "author": "Warky Devs",
"version": "0.0.5", "version": "0.0.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -121,10 +121,17 @@ export const GridlerDataGrid = () => {
}, 100); }, 100);
} }
}} }}
ref={refWrapper}
> >
{sections?.left} {sections?.left}
<div
ref={refWrapper}
style={{
flexGrow: 2,
height: '100%',
minHeight: '80px',
width: '100%',
}}
>
{width && width > 0 && height && height > 0 && ( {width && width > 0 && height && height > 0 && (
<DataEditor <DataEditor
cellActivationBehavior="double-click" cellActivationBehavior="double-click"
@ -132,25 +139,15 @@ export const GridlerDataGrid = () => {
columns={(renderColumns as Array<GridColumn>) ?? []} columns={(renderColumns as Array<GridColumn>) ?? []}
columnSelect="none" columnSelect="none"
drawFocusRing drawFocusRing
height={(height ?? 400) - 4}
rangeSelect="multi-rect"
rowMarkers={{
checkboxStyle: 'square',
kind: 'both',
}}
rowSelect="multi"
rowSelectionMode="auto"
spanRangeBehavior="default"
{...glideProps}
getCellContent={getCellContent} getCellContent={getCellContent}
getCellsForSelection={getCellsForSelection} getCellsForSelection={getCellsForSelection}
getRowThemeOverride={theme.getRowThemeOverride} getRowThemeOverride={theme.getRowThemeOverride}
gridSelection={_gridSelection} gridSelection={_gridSelection}
headerHeight={headerHeight ?? 32} headerHeight={headerHeight ?? 32}
headerIcons={{ sort: SortSprite, sortdown: SortDownSprite, sortup: SortUpSprite }} headerIcons={{ sort: SortSprite, sortdown: SortDownSprite, sortup: SortUpSprite }}
height={(height ?? 400) - 4}
onCellContextMenu={(cell, event) => { onCellContextMenu={(cell, event) => {
event.preventDefault(); event.preventDefault();
glideProps?.onCellContextMenu?.(cell, event);
if (!refContextActivated.current) { if (!refContextActivated.current) {
refContextActivated.current = true; refContextActivated.current = true;
onContextClick('cell', event, cell[0], cell[1]); onContextClick('cell', event, cell[0], cell[1]);
@ -206,6 +203,7 @@ export const GridlerDataGrid = () => {
onHeaderMenuClick={onHeaderMenuClick} onHeaderMenuClick={onHeaderMenuClick}
onItemHovered={onItemHovered} onItemHovered={onItemHovered}
onVisibleRegionChanged={onVisibleRegionChanged} onVisibleRegionChanged={onVisibleRegionChanged}
rangeSelect="multi-rect"
ref={refMerged as React.Ref<DataEditorRef>} ref={refMerged as React.Ref<DataEditorRef>}
rightElement={ rightElement={
<Group> <Group>
@ -217,13 +215,20 @@ export const GridlerDataGrid = () => {
rowHeight={rowHeight ?? 22} rowHeight={rowHeight ?? 22}
//rowMarkersCheckboxStyle='square' //rowMarkersCheckboxStyle='square'
//rowMarkersKind='both' //rowMarkersKind='both'
rowMarkers={{
checkboxStyle: 'square',
kind: 'both',
}}
rows={total_rows ?? 0} rows={total_rows ?? 0}
rowSelect="multi"
rowSelectionMode="auto"
spanRangeBehavior="default"
theme={theme.gridTheme} theme={theme.gridTheme}
width={width ?? 200} width={width ?? 200}
{...glideProps}
/> />
)} )}
</div>
{/* </Portal> */} {/* </Portal> */}
<Computer /> <Computer />
{!hasLocalData && <Pager />} {!hasLocalData && <Pager />}