EasyUI Forum
May 04, 2024, 05:10:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  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.

Code:
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);
137  General Category / EasyUI for React / [Solved] SideMenu Error on: September 11, 2019, 06:23:49 AM
I found this in my code, but the demo at https://www.jeasyui.com/demo-react/main/index.php?plugin=SideMenu&theme=material-teal&dir=ltr&pitem=&sort=asc also has this error

click Toggle, hover the vertical ..., click the header "Item2", this is when the error happens.
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.
139  General Category / EasyUI for React / Re: SubMenu pop to left? on: August 29, 2019, 06:10:33 AM
perfect!
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?
142  General Category / EasyUI for React / ButtonGroup and LinkButton selected prop on: August 27, 2019, 01:52:45 PM
I can't get the selected property to do anything.  it also doesn't apply in the Button Group demo at https://www.jeasyui.com/demo-react/main/index.php?plugin=LinkButton&theme=material-teal&dir=ltr&pitem=&sort=asc

known issue?
143  General Category / EasyUI for React / Re: documentation inconsistencies on: August 15, 2019, 12:32:33 PM
MessagerDialog isn't documented and isn't mentioned anywhere at all.

I'm just pointing out that demos show use of props that the documentation does not mention. 
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.

Code:
.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
146  General Category / EasyUI for React / Re: MenuButton example issues on: August 12, 2019, 12:55:05 PM
I worked it out, the onMenuItemClick prop needs to be on MenuButton, not on Menu.
147  General Category / EasyUI for React / Re: TextBox and PasswordBox inputID not getting set on: August 12, 2019, 12:09:01 PM
that generated the html I expect, but lastpass still doesn't find the fields  Sad
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

Code:
				<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.
149  General Category / General Discussion / Re: About input autocomplete on: August 06, 2019, 02:06:05 PM
I think they mean this https://www.w3schools.com/tags/att_input_autocomplete.asp not drop down list auto completes

allowing us to set it as "username" or "password" helps with password manager compatibility.
150  General Category / EasyUI for React / Re: how to use i18n in easyui for react on: July 31, 2019, 02:23:16 PM
Is there a way to bind that to i18next's language so it changes automatically when i18n.changeLanguage() is called?
Pages: 1 ... 8 9 [10] 11 12 ... 15
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!