Show Posts
|
Pages: 1 ... 8 9 [10] 11 12 ... 15
|
136
|
General Category / EasyUI for React / Re: how to use i18n in easyui for react
|
on: September 11, 2019, 06:44:06 AM
|
got it. import React, { Component } from 'react'; import { withTranslation } from 'react-i18next'; import i18n from 'i18next';
import { LocaleProvider } from 'rc-easyui'; import easyuien from 'rc-easyui/dist/locale/easyui-lang-en'; import easyuies from 'rc-easyui/dist/locale/easyui-lang-es';
const easyuilangs = { en: easyuien, es: easyuies }
class App extends Component { constructor(props) { super(props); this.state = { easyuilocale: easyuien }; }
componentDidMount() { const self = this; self.setLang(self, i18n.language); i18n.on('languageChanged', function (lng) { self.setLang(self, lng); }); }
setLang(self, lng) { self.setState({ easyuilocale: easyuilangs[lng.split("-")[0]] }); }
render() { const { easyuilocale } = this.state;
return ( <LocaleProvider local={easyuilocale}> your content here </LocaleProvider> ); } }
export default withTranslation()(App);
|
|
|
138
|
General Category / EasyUI for React / Re: SubMenu pop to left?
|
on: August 29, 2019, 09:45:44 AM
|
well, almost perfect...
I'd like to suggest an additional check: if the left side of the menu would end up off the left side of the screen, allow it to overlap the parent menu so it won't be off the screen.
|
|
|
140
|
General Category / EasyUI for React / Re: SubMenu pop to left?
|
on: August 28, 2019, 02:57:27 PM
|
sorta tracked it down, "n = f.b.outerWidth(this.el)" is coming up zero in the alignMenu function, nothing there has an offsetWidth >0.
I think this is because the code is being run before the divs are actually rendered. getBoundingClientRect() and scrollWidth are also zero.
not sure how to fix it...
|
|
|
141
|
General Category / EasyUI for React / SubMenu pop to left?
|
on: August 28, 2019, 02:15:44 PM
|
I have a menu with a submenu that's on the right edge of the window, when the submenu pops out it goes to the right, creating a horizontal scroll bar, and it's only possible to even see the menu by using the keyboard arrow keys to scroll over. any way to make it pop to the left? or be "smart" and not pop outside the viewable area?
|
|
|
144
|
General Category / EasyUI for React / documentation inconsistencies
|
on: August 14, 2019, 09:08:32 AM
|
on https://www.jeasyui.com/documentation5/index.php many component docs list as "extends LocaleBase", but LocaleBase isn't documented. does it really have no useful properties? Messager for example shows this, but in the Demos the custom example shows using borderType and showHeader, which after some poking leads me to believe it actually Extends from Dialog. MenuButton does not list onMenuItemClick in the docs or demos at all, I found it using the React Developer Tools for Chrome, and this prop is the only way I was able to make menus under the button register a click event.
|
|
|
145
|
General Category / EasyUI for React / To enable Font Awesome for iconCls....
|
on: August 12, 2019, 01:21:59 PM
|
If you want to use Font Awesome for iconCls icons, add this to your index.css then use the normal "fas fa-xxx" classes in iconCls. .l-btn-icon { font-size: inherit; }
I've tested minimally, this doesn't seem to affect the regular icons, so you can use either. there's probably some case that does have an effect, so test your stuff
|
|
|
148
|
General Category / EasyUI for React / TextBox and PasswordBox inputID not getting set
|
on: August 06, 2019, 02:12:37 PM
|
might be specifically when inside a FormField <FormField name="username" label="Username:"}> <TextBox iconCls="icon-man" inputId="username" /> </FormField> <FormField name="password" label="Password:"}> <PasswordBox iconCls="icon-lock" inputId="password" /> </FormField>
the resulting HTML has a generated ID, not the specified one. my goal is to try to get the form to play nice with LastPass specifically, and other password managers if possible. this is one of the methods the password managers use to find what field to hook into.
|
|
|
|