<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to implement onMove? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-implement-onMove/m-p/750274#M2335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I have a property of type array and allowMove is set to true. When I move an item the property panel is updated but I get this error&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;TypeError: undefined is not a function at Object.f.sortableOptions.onMove&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tried to add &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sortableOptions to the definition of the array and to the items in the array but it doesn't work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2014 12:55:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-12-01T12:55:03Z</dc:date>
    <item>
      <title>How to implement onMove?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-implement-onMove/m-p/750274#M2335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I have a property of type array and allowMove is set to true. When I move an item the property panel is updated but I get this error&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;TypeError: undefined is not a function at Object.f.sortableOptions.onMove&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tried to add &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sortableOptions to the definition of the array and to the items in the array but it doesn't work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 12:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-implement-onMove/m-p/750274#M2335</guid>
      <dc:creator />
      <dc:date>2014-12-01T12:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement onMove?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-implement-onMove/m-p/750275#M2336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out a way to fix the problem. I don't no if it's the right way but it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a component based of the list component, but change the onMove function and changed the last row.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14174709749215286" jivemacro_uid="_14174709749215286" modifiedtitle="true"&gt;
&lt;P&gt;onMove: function(old_index, new_index) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (new_index &amp;gt;= f.listData.length) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var k = new_index - f.listData.length;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((k--) + 1) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.listData.push(undefined);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.listData.splice(new_index, 0, f.listData.splice(old_index, 1)[0]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.$emit("saveProperties");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;return a.addComponent("kfMeasureList", g), g&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the new component in my extension and change the component property to &lt;SPAN style="font-size: 10pt; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;kfMeasureList&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 22:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-implement-onMove/m-p/750275#M2336</guid>
      <dc:creator />
      <dc:date>2014-12-01T22:00:06Z</dc:date>
    </item>
  </channel>
</rss>

