EasyUI Forum
May 04, 2024, 01:30:53 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 9 10 [11] 12 13 ... 15
151  General Category / EasyUI for React / MenuButton example issues on: July 31, 2019, 02:08:10 PM
I'm having problems getting onItemClick working.  as a test, I've ran create-react-app to make a new project and replaced App.js with the following based on your MenuButton live demo.

Code:
import React from 'react';
import { Menu, MenuButton, MenuItem } from 'rc-easyui';


class App extends React.Component {

  TestMenu() {
    function handleClick(val) {
      console.log(val);
      alert(val);
    }
    return (
      <Menu onItemClick={handleClick.bind(this)}>
        <MenuItem text="Add" value="add"></MenuItem>
        <MenuItem text="Delete" value="delete"></MenuItem>
      </Menu>
    );
  }

  render() {
    return (
      <div>
        <MenuButton text="Edit" plain iconCls="icon-edit" menu={this.TestMenu}></MenuButton>
      </div>
    );
  }
}
 
export default App;

the button and menu renders fine, but I get no alert and no console log no matter where or what I click.  I've tried every permutation of handleClick I can think of and either get understandable errors or no output.  what's the right way to handle the item click and get the value?
152  General Category / EasyUI for jQuery / Re: Mobile Documentation on: November 03, 2016, 02:03:00 PM
there are a few things that are not in the docs that you can derive from the demos and source files, such as the linkbutton "back" property, and the "m-" css classes.
153  General Category / EasyUI for jQuery / iPhone scrolling issue with accordion on: November 02, 2016, 10:26:26 AM
I've mocked up a page at http://test.mywilsonmfg.com/drag.html

if you expand any item, vertical list scrolling does not happen when you touch on the item content, only if you touch on an item title.  this might not seem like a huge issue, if you content is more than 1 screen worth, you can't scroll down to read it all.

android scrolls the list and you can read it all. 

I'm not sure this is directly a jeasyui issue, but is there some known work around?
154  General Category / EasyUI for jQuery / Re: timespinner save value onblur on: September 15, 2015, 11:48:00 AM
there's probably a cleaner way, but this works http://jsfiddle.net/cqfra40y/
155  General Category / EasyUI for jQuery / Re: IE9+ focus issue on: September 15, 2015, 06:08:23 AM
that worked.  thank you.
156  General Category / EasyUI for jQuery / Re: timespinner save value onblur on: September 14, 2015, 01:15:20 PM
since you're putting on the blur on the textbox itself, clicking the arrows triggers a blur.  one thing I can think of is to have the blur check e.relatedTarget to see if it's one of the arrows, and if it is, don't submit.
157  General Category / EasyUI for jQuery / IE9+ focus issue on: September 14, 2015, 07:59:01 AM
I'm having an issue that I've verified on a couple PCs where when you type text in a easyui-textbox then switch to another window, then switch back the text box gets cleared.  this only happens in IE and happens in both IE9 mode and in Edge on Win7 and Win8.1.  If you click the page so the easyui-textbox doens't have focus then it doesn't happen.  it only happens when focus goes from another window directly to the textbox, either via alt-tab or clicking.  I haven't only been able to reproduce it when using jeasyUI, older pages that do not use jeasyUI do not have the issue.

I've set up a test page http://test.mywilsonmfg.com/focus/focus.html this is extracted from my framework's output so some of it seems like odd layout, but it's reusable stuff to make design easier. 

My attempts to debug using IE's dev tools have been futile.  I added an on focus event handler and set a breakpoint, which stops and the text is still there, but stepping the code does not step anywhere except that handler, and the text disappears, sometimes just by waiting a bit at the breakpoint. 
158  General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help on: March 27, 2015, 06:01:00 AM
yes, but they looks the same, so you need to provide more details
159  General Category / EasyUI for jQuery / Re: combobox keyHandler on: March 26, 2015, 08:21:17 PM
ah, I see how I did that wrong now.  still, needed to detect if the panel if visible and call the original to retain that behaviour. 

IMO, it's a bit of a documentation gap, everything looks like the keyHandlers don't do anything, but when the panel is open they most certainly do things.
160  General Category / EasyUI for jQuery / Re: combobox keyHandler on: March 26, 2015, 02:31:50 PM
more info:  $.extend seems to change global, not just for that for that instance.  

and I got it worked out, here's my solution: http://test.mywilsonmfg.com/test.php  the first box is the default behavior, the 2nd is my additions.  the comboUp and comboDown functions should work with any instance of a combobox,
161  General Category / EasyUI for jQuery / Re: change cell style on Click Cell on: March 26, 2015, 11:19:28 AM
there is a div inside the td, apply the style to that
162  General Category / EasyUI for jQuery / Re: jquery easyui datagrid row link help on: March 26, 2015, 11:15:30 AM
I'm not sure I understand the difference between working and not working.  what's the value of url variable after?
163  General Category / EasyUI for jQuery / combobox keyHandler on: March 26, 2015, 10:31:29 AM
I'm having trouble extending the Combobox's keyhandler.  I want that without the list dropped down that using up and down arrow keys will cycle though the list just like when it is extended.  I've gotten that to work, but then the auto-complete feature stopped working. 

I think what I need is that in my function I have to detect when the panel is open and then call the default key handle functions, but $.fn.combobox.defaults.keyHandler is all empty so I'm unsure of what I can do to restore the default behavior.

I'm extending like: 
Code:
keyHandler: $.extend($.fn.combobox.defaults.keyHandler, { my stuff here }
164  General Category / EasyUI for jQuery / Re: numberbox editor in grid, limitations? on: March 25, 2015, 06:10:19 AM
so textbox('textbox') is the trick.  I was able to add the keydown using this in the onClickCell.

Code:
			$.each($('#dg').datagrid('getEditors', index), function(i, o) { 
($(o.target).data('textbox') ? $(o.target).textbox('textbox').on('keydown', addKeyHandle) : $(o.target).on('keydown', addKeyHandle));
});
and this is the addKeyHandle function
Code:
function addKeyHandle(e){
switch(e.keyCode) {
case 13: //
endEditing();
}
}


165  General Category / EasyUI for jQuery / Re: numberbox editor in grid, limitations? on: March 25, 2015, 05:54:28 AM
that's odd, I was basing it off the row editing demo, but yesterday it used onClickRow, I even copy/pasted that function.
Pages: 1 ... 9 10 [11] 12 13 ... 15
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!