Open jamalabo1 opened 4 years ago
Our support for RTL is really bad, are you interested in giving a pr?
@chenshuai2144 no problem, I'll do my best. but can't you wrap the components so that they respond to antd ConfigProvider?
How I fixed this in my project (hacky):
an-design/pro-table
package by hand (copied out of node_modules
folder)/src/component/intlContext/index.js
line 106var IntlContext = _react.default.createContext(zhCNIntl);
# to
var IntlContext = _react.default.createContext(enUSIntl);
import
import ProTable, { ProColumns, TableDropdown, ActionType } from '../../sharedComponents/pro-table/lib'
any workaround ?
I found a possible issue, and its related to craco-antd package ...
I had to modify this piece of code manually inside the node_modules:
https://github.com/DocSpring/craco-antd/blob/master/lib/craco-antd.js#L91
and change the library directory from "lib" to "es" compile and its working again ...
@chenshuai2144 why did it work ?
does that change (the one manually made by me) break anything else ?...
im using antd: 4.7.0 @ant-design/pro-table: 2.9.5
Hi, I noticed two things:
options
prop) it cancels the RTL
from the ContextProvidersticky
prop not working together: cant scroll from right to left Any ideas why?
A simple way for the ConfigProvider to work (as far as tested on the ProSelect component) is to use the babel-plugin-import. Either directly or if you are using it through craco - antd; set the option in the craco config js. babelPluginImportOptions: { libraryDirectory: "es", },
when the direction is set to RTL the components still adapt to LTR style, from pagination to header and search even toolbar,