-
Notifications
You must be signed in to change notification settings - Fork 424
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
slickGrid column resizing not worked Properly in RTL #446
Comments
You have just changed repos, so firstly just checking you are now using our repo's codebase. |
You might need this |
I have set direction : rtl on the body tab, What is this 'RTL theme' that the first poster refers to? thanks, |
I suspect they just use |
But it's not only CSS, is it? |
I'll help if I can but I have never used RTL languages, so I don't think I'm the best person to be testing that scenario. If you could provide a new RTL example, I'm happy to tweak elements of the grid where necessary to support the example in working correctly. Possibly RTL will be a new Slickgrid |
How do I add the RTL example? |
Start with an existing example page (you might be best with a fairly fully featured one, like 'model', and you might want to check additional features like grouping and have more than one example page). Just call them 'example4-model-RTL', for example. |
can you help me to find where in the code is there a reference to resize columns (by dragging header columns), it doesn't work right in RTL |
All the resize column code is in Really, an example is needed so we can actually see how this works and play around with it. |
So I took another look at this and all you need is to create a CSS class named "rtl" and then assign it to both Option 1<style>
.rtl {
direction: rtl;
}
</style>
<script>
var columns = [
{id: "title", name: "Title", field: "title", cssClass: "rtl", headerCssClass: "rtl"},
];
</script> in our next v5, we'll add CSS variables to our default them so that you can change the CSS to Option 2 (already doable)Technically speaking, you could already do that yourself with the current styling theme, just modify the CSS <style>
.slick-header-column,
.slick-cell {
display: inline-flex;
justify-content: flex-end;
// hack to allow child element with ellipsis, see article below
// https://css-tricks.com/using-flexbox-and-text-ellipsis-together/
min-width: 0;
}
.slick-header-column .slick-column-name,
.slick-cell span.child-cell {
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
</style>
<script>
// Custom Formatter to wrap text content into a SPAN
// we can add ellipsis on a SPAN
function spanFormatter (row, cell, val) {
return `<span class="child-text">${val}</span>`;
}
var columns = [
{id: "title", name: "Title", field: "title", formatter: spanFormatter},
];
</script> as you can see both implementation works and you can do any of these 2 options in your code today, choose the best option that fits your need. Summary/NotesThese kind of questions would be better answered on Stack Overflow. Also note that the CSS stylesheets that comes with SlickGrid were only created as templates, the user can and should modify it to fit their needs. I think this should solve the problem and so I think it's ok to close this issue... if that doesn't, well sorry but all maintainers of SlickGrid are using LTR syntax, so the best persons to fix these kind of RTL issues is you instead of us. |
Hello I Used SlickGrid in RTL Theme and When I resize the column width it wont resize the column in right way.
The text was updated successfully, but these errors were encountered: