Show Posts
|
Pages: 1 ... 3 4 [5] 6 7 ... 15
|
61
|
General Category / EasyUI for React / Re: Messager position
|
on: June 09, 2020, 10:58:39 AM
|
that had no effect, at best this would let me specify where it should be placed, right?
it does already calculate placing the dialog in the center of view, even when scrolled down, just that it only does this calculation the first time it's displayed, instead of every time
|
|
|
62
|
General Category / EasyUI for React / Messager position
|
on: June 03, 2020, 01:07:54 PM
|
When using Messager.alert, and probably the other methods too, the position is set the first time it is displayed. Scroll the page and display it again and it may be out of view
|
|
|
64
|
General Category / EasyUI for React / Re: ComboBox Focus issue
|
on: April 27, 2020, 02:50:40 PM
|
After more testing this has additional issues. click the drop down arrow for one box, then click the drop down arrow for the other box, now use your keyboard up and down arrow keys and the first box is what is active. import React, { useRef, useState } from 'react'; import './App.css'; import { Form, FormField, ComboBox } from 'rc-easyui';
function App() { const messager = useRef();
const [model, setModel] = useState({ Box1:0, Box2:2 });
return ( <div className="App"> <Form errorType="tooltip" model={model} labelWidth={120} labelAlign="right" > <FormField name="Box1" label="Box 1:" style={{float:"left"}}> <ComboBox value={model.Box1} tabIndex={1} editable={false} data={[ { value: 0, text: "Item 0" }, { value: 1, text: "Item 1" }, { value: 2, text: "Item 2" }, ]} /> </FormField> <FormField name="Box2" label="Box 2:" style={{float:"left"}}> <ComboBox value={model.Box2} tabIndex={2} editable={false} data={[ { value: 0, text: "Item 0" }, { value: 1, text: "Item 1" }, { value: 2, text: "Item 2" }, ]} /> </FormField> </Form> </div> ); }
export default App;
add this to your App.css and it'll highlight (literally) the issue .form-field-focused { box-shadow: 0px 0px 3px 2px #eae885; background-color: #eae885; }
|
|
|
68
|
General Category / EasyUI for React / ComboBox Focus issue
|
on: April 23, 2020, 01:26:05 PM
|
When using editable={false} with a combobox, when a list item is selected focus is taken away from the combobox and not given back. ideally, the list would not take focus away as it's all the same component.
|
|
|
70
|
General Category / EasyUI for React / Messager alert() not taking focus
|
on: April 22, 2020, 03:07:01 PM
|
in this example, click in the text box, then press tab to focus the button, then press enter to activate the button onClick. you get the alert box, but now just press enter and watch the value in the text box increase the LinkButton focus remains and accepts the keystrokes, even though the dialog appears modal and the button can't be clicked. import React, { useRef, useState } from 'react'; import './App.css'; import { Form, FormField, LinkButton, Messager, TextBox } from 'rc-easyui';
function App() { const messager = useRef();
const [model, setModel] = useState({ myBox:0 });
function onClick() { setModel({ myBox: parseInt(model.myBox)+1 }) messager.current.alert({ title: "Clicked", msg: "now press enter" }); }
return ( <div className="App"> <Form errorType="tooltip" model={model} labelWidth={120} labelAlign="right" > <FormField name="myBox" label="Box:"> <TextBox value={model.myBox} tabIndex={1} /> </FormField> <FormField > <LinkButton onClick={onClick} >Tab to here and press enter</LinkButton> </FormField> </Form> <Messager ref={messager}></Messager> </div> ); }
export default App;
|
|
|
72
|
General Category / EasyUI for React / Enhancement suggestion in Form validators
|
on: April 21, 2020, 08:04:20 AM
|
I think it would be useful to have the option of the form validator "message" to be a function that the value and parameters are passed to so that transforms more complex than simple token substitution could be applied to the message. example: percentage: { validator: (value, param) => { if (parseFloat(value) < (param[0] * param[1])) { return false; } return true; }, message: (value, param) => { return "Value (" + value + ") must be " + (param[0]*100) + "% of " + param[1] + " or more"; } }
const rules = { field: "percentage[0.25,50]" }
note this is a simplified example, the use case I'd like is actually quite a bit more complex.
|
|
|
73
|
General Category / EasyUI for React / Re: Form.validate() performance
|
on: April 20, 2020, 08:54:24 AM
|
I think I've worked out what's killing performance on this, at least in my case.
it's looping ALL fields and checking if they have a rule. it would be a lot faster if it looped the rules and check for the fields, as not all fields have rules.
|
|
|
74
|
General Category / EasyUI for React / Re: Form.validate() performance
|
on: April 10, 2020, 05:26:13 PM
|
I'm still finding this to be an issue. I've optimized so that it doesn't call the full validate very often, and that helps, but in some cases it just needs done.
is my only option to split it into multiple forms and hope I don't need to validate more than one form in any given process?
|
|
|
|