Resizing columns does not work properly when using Material UI X-Grid component with RTL theme.
Accepted- dragging the LEFT portion of the column separator to the left will expand the column.
Actual- dragging the LEFT portion of the column separator to the left shrinks the column.
How can I fix it?
DEMO
Actually, you can just wrope it with tag like this:
<div style={{direction:'rtl'}}>
...
</div>
Then your dragging portion is correct but MUI has a bug there so it's not dragging correctly.
Related
Trying to use spacing in a grid that have full width. I'm assuming it should work like gap in css-grid however it gives me extra padding to the right and a horizontal scroll.
It also gives me padding bottom on the last row.
Not sure if gap is supported in Grid2 but that breaks even more.
https://codesandbox.io/s/busy-gwen-yhb7ho?file=/src/App.tsx
The spacing prop works in different ways.
Let me explain it a little bit:
If you add a spacing prop in the Grid component you will add padding on the bottom, right, and left in the first row or top row you can check it by opening the developer tool.
But add padding on every side on the other rows except the top row or first row.
So to add space horizontal or vertical you can use the following props to manipulate spacing.
rowGap
columnGap
rowSpacing
columnSpacing
NOTE: Remember one thing before using gap props and spacing props: gap, rowGap and columnGap will add spaces between divs, rows, columns, and others on the other hand spacing, rowSpacing, and columnSpacing adds spaces on every side top, right, bottom, and left.
These props will allow you to add spcese in your prefered way.
To learn more about the Grid V2 (Grid2) Head over to the Documentation
I would like to only remove the vertical gridlines from a Tableau chart. I am aware that I can go to Format > Lines > Gridlines > Set to NONE. But this removes both vertical and horizontal gridlines. I am trying to only remove the vertical gridlines. (See the screenshot. I have made the gridlines little darker to demonstrate my question).
I looked around, but could not find a solution. Please help.
On the Column Divider from the Format Boarders menu, move the Level slider to the left.
Result:
At the top of the format pane in the left side bar, don't select the Borders icon (which looks like a little grid) Instead, select the Lines icon just to the right (which looks like a set of different width lines)
The Borders settings control the display of borders between cells and panes, i.e. the parts of the view created when putting discrete (blue) fields on the Rows or Columns shelves.
The Lines settings control the display of the axis, grid and other lines, i.e. the parts of the view created when putting continuous (green) fields on the Rows or Columns shelves.
Once you are working with the Lines format settings, you can scope your changes to either just the vertical grid lines, just the horizontal grid lines, or both by selecting Sheet, Rows or Columns from the tab just under the icons discussed above.
Experiment to get the hang of it. Whenever you change a setting from the default value, the title goes bold. You can right click on bold titles to clear the change, or you can clear all the changes to a section by hitting clear at the bottom of the format pane. So its easy to undo a change you don't like, allowing you to experiment with confidence to learn how the settings work.
I am trying to position the horizontally scrollbar on a bottom position when some field of the table is changed.I tried with : Scrolling Ag Grid using ensureIndexVisible()
But as least I know it is only for vertical scrollbars
There is also a method ensureColumnVisible(colId), from docs (in the same section you are refering to):
Ensures the column is visible, scrolling the table if needed.
I have copied the code column definitions and all attributes pertaining to resizing columns from the ag-grid examples for re-sizing columns in ag-grid vue, however I cannot resize my columns... the cursor will not even change to the "arrow" when I hover over the left or right edges of the columns.
Has anyone ever run into this?
If you are using ag-grid version 19.1.2 you can enable column resizing by setting [enableColResize]=true to ag-grid component
I have a form that is shown in datasheet view. There are 35 fields (columns), so I have to scroll horizontally. It is ok, no problem. The only thing I don't like is that, after last column, a big white space (empty) area appears. It is like if there was a padding or margin on the right of the table.
How can I remove that white space area? (I don't like having to scroll to see only white space)
That's just the way a datasheet works. Think of how an Excel worksheet looks. If you want to control the layout more precisely, you could present the data as a continuous form with many columns and anchor the right edge of the form to the right edge of the window. But then you would sacrifice the power of the datasheet view (two-way compatibility with Excel, etc.).