EasyUI Forum
May 13, 2024, 04:15:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2] 3
16  General Category / EasyUI for React / DataGrid Column Render Always re rendering on mouse move, click or etc.. on: December 06, 2018, 05:59:22 AM
Hi,

My React Datagrid sample column code below

Code:
{
    field: "name",
    title: "Name",
    render: ({row}) => (
       
               formatrow(row.name);

   )

}

formatrow = (name) => {
     console.log(name);
}

As you can see i'm calling  formatrow function when rendering column.

I'm seeing at F12 Developer tools grid is re rendering always when mouse is over or click or expand or etc.

This is weird. How can i prevent re rendering?
17  General Category / EasyUI for React / Re: Need Documentation create element with javascript and react on: December 06, 2018, 04:49:07 AM
thanks
18  General Category / EasyUI for React / Re: Cannot Apply Theme in react on: December 04, 2018, 11:26:08 PM
After install the 'rc-easyui', the package will be installed in 'node_modules/rc-easyui' directory. You can put this lines to the 'index.css' file that is in your project.
Code:
@import '~rc-easyui/dist/themes/material-teal/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';

And then import the 'index.css' file in your 'index.js'.
Code:
import './index.css';

thanks. i tried it but getting invalid character "@" error. I think something wrong with my webpack.
19  General Category / EasyUI for React / Re: Need Documentation create element with javascript and react on: December 04, 2018, 11:16:34 PM
With this code you can create a DataGrid dynamically. Reset the 'columns' state to re-render the DataGrid.
Code:
<DataGrid data={this.state.data} style={{height:250}}>
  {
    this.state.columns.map((col,index) => (
      <GridColumn key={index} {...col}></GridColumn>
    ))
  }
</DataGrid>

Thanks for reply. Yes i already using this code i got it from sample react nested grid code.

defining columns in state

Code:
columns: [
      {
               field: 'id',
               title: 'userid',
               hidden: true ----------->>>> doesnt worked
        }
      {
               field: 'name',
               title: 'username',
               width: 200,
               formatter: function(value) { --------------------------------->>> formatter doesnt worked
                         return "<button>value</button>"
               }
        }
]

20  General Category / EasyUI for React / Need Documentation create element with javascript and react on: December 04, 2018, 07:42:11 AM
Hi,

I'm creating elements with javascript in react.

For example i need to modify a datagrid with,

hidden column
frozen column
button column
slider column

Some examples here but most of examples with no javascript.

for example;

how can i hide a column, (i tried hidden: true doesn't worked)
how can i add a slider in column

with javascript and react?

Thanks.
21  General Category / EasyUI for React / Re: Cannot Apply Theme in react on: December 04, 2018, 07:15:22 AM
Try this code instead.
Code:
@import '~rc-easyui/dist/themes/default/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';

Doesn't worked.

my.main.css is in css folder. This is my folder structure. I seeing css files loaded without any problem with my codes (at F12 developer tools). But can't apply theme.


dist
     css
          easyui
              themes
              .
              .
              .
           my.main.css
index.html
22  General Category / EasyUI for React / Cannot Apply Theme in react on: December 04, 2018, 05:41:10 AM
Hi,

Code:
@import 'easyui/themes/default/easyui.css';
@import 'easyui/themes/icon.css';
@import 'easyui/themes/react.css';


Is there any thing to do for theme define? because  i can't see themed objects
23  General Category / EasyUI for React / Re: React Nested Datagrid on: December 04, 2018, 03:54:20 AM

is there any sample code for get data from ajax request?
24  General Category / EasyUI for React / Re: React Nested Datagrid on: December 03, 2018, 10:49:41 PM
Oh. Thank you.  Grin
25  General Category / EasyUI for React / React Nested Datagrid on: December 03, 2018, 07:05:15 AM
Hi

I want to create a nested subgrid.

Is there any way to do this with react and easyui?

26  General Category / General Discussion / Re: EasyUI React Layout does not split as resizable on: November 27, 2018, 11:19:16 PM
Please update to a newer version.

Thanks for answer. I already using  newer version. But solved when i re run npm install. thanks.
27  General Category / General Discussion / EasyUI React Layout does not split as resizable on: November 23, 2018, 04:09:46 AM
Hello.

I made a react easyui layout which has west-center-east columns.

I want to define East column as splitted and resizable (with center)

How can i do that

Below code does not working.  I can see layout as unresizable

Code:
          <Layout style={{ width: "100%", height: "100%" }}>
          <LayoutPanel region="north" className="p-top">
            <div>North Region</div>
          </LayoutPanel>
          <LayoutPanel region="west" className="p-left">
            <div >West Region</div>
          </LayoutPanel>
          <LayoutPanel region="east" split="true" className="p-right">
            <div>East Region</div>
          </LayoutPanel>
          <LayoutPanel region="center" className="p-center">
            <div>Center Region</div>
          </LayoutPanel>
        </Layout>
28  General Category / EasyUI for jQuery / Re: Change window object color/theme on: November 12, 2018, 07:30:23 AM
Want window objects to have different colors depending upon usage/state.

What would be the best way to do this dynamically?

Thanks!

I need same feature. Is there anybody has an idea?

Thanks
29  General Category / EasyUI for jQuery / Slider-Tip Show on: November 11, 2018, 11:50:02 PM
Hello.

Is there ayway to show slider-tip while slider value changing with mouse. After mouse button up  slider-tip must be invisible.

And also can we change slider-tip position? I can do that with css rules, but i think that maybe some codes can be ready there for this
30  General Category / EasyUI for jQuery / Re: Problem showing a slider in EasyUI Datagrid Colum on: November 11, 2018, 11:14:38 PM
Perfect Smiley Thank you.

Please refer to the code below:
Code:
$('#dg').datagrid({
  columns: [[
    {
      field: 'a',
      title: 'Şeffaflık',
      width: 120,
      align: 'center',
      formatter: function(value, row, index) {
        if (row.editing) {} else {
          return '<div class="row-slider"></div>'
        }
      }
    }
  ]],
  data:data,
  onLoadSuccess: function(){
    $(this).datagrid('getPanel').find('.row-slider').slider({
      width: 100,
      mode: "h",
      showTip: true,
      value: 1,
      min: 0,
      max: 1,
      step: 0.1
    })
  }
})
Pages: 1 [2] 3
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!