Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kelvin Lemus
    @kelvinlemus
    hi
    Olli Jaakkola
    @ollija
    hello
    lauriegriffiths
    @lauriegriffiths
    Hey, I just tried out the sortable grid
    It's great! But I'm trying to improve the performance a little
    Olli Jaakkola
    @ollija
    Yeah the can be a bit laggy in Dev Mode
    it can be*
    I suggest running it JS Dev Mode ticked off and without remote debugging when trying out the performance
    and on IOS maybe run with release schema
    David Keene
    @spotby
    hey is anyone around? Is there an easy way to change the algorithm that is used to positioning the other elements in the grid on a move? i'd like to keep the order of the the other elements constant (ie, item.order > draggingItem, item.order ++.
    instead of the current switch spaces algorithm.
    Peter Miles
    @petermilesdev_twitter
    @ollija can you change the block height of a grid element?
    Sam
    @samazadi

    Hi @ollija , quick question. I'm trying to add another property to the blocks, so that when updateItemOrder is called, the returned object will look something like:

    Object {

    itemOrder: Array [
    0: Object {
    key: "1"
    order: 0
    ref: null
    url: "www.example.com"
    }
    1: Object {
    key: "5"
    order: 1
    ref: null
    url: "www.example2.com"
    }
    n: Object ...
    ]

    }

    I've added "url: item.url" to the this.itemOrder.push on line 392 of the index file. I also send in the url I want via props, and set an initial value for the url on line 85 of the index.

    Still though, when I move the blocks it logs undefined for url. I cant figure out where the properties of properties.children that get sent to _saveItemOrder are coming from. How can I add "url" to the properties.children?

    Any help would be great!

    Ilie Stefan
    @stefanionutilie_twitter
    Hi @ollija, I have several 'cell's inside this sortable grid. Some cells have props connected to a remote API. Apparently the cells that are inside the sortable_grid don't update and those which are outside do update.
    My main question is: Do props inside <SortableGrid> are updatable?
    <SortableGrid>
     <View style={styles.defaultCell} key={key_item}>
      <Text style={styles.cellTitle}>Availability</Text>
      <Text style={styles.cellValue}>{this.props.activity}%</Text>. //This doesn't update
     </View>
     </SortableGrid>
     <View style={styles.defaultCell} key={key_item}>
      <Text style={styles.cellTitle}>Availability</Text>
      <Text style={styles.cellValue}>{this.props.activity}%</Text>. //This does get updated
     </View>
    tungtvo
    @tungtvo
    hi @stefanionutilie_twitter , I've encountered the same problem and have found out there's a fork from krhovsky which can update props inside SortableGrid.
    Take a look:
    https://github.com/krhovsky/react-native-sortable-grid