shinobukawano / Ext.ux.AccordionList

Accordion List Component for Sencha Touch 2
http://kawanoshinobu.com/public/demo/accordionlist/
50 stars 28 forks source link

Accordion List Index Bar issue sencha 2.3.0 #23

Closed dibishks closed 10 years ago

dibishks commented 11 years ago

Hi kawanoshinobu,

Am facing a problem to put list index bar on your Accordion list, am using sencha 2.3.0. I didn't find any config to include index bar in to your list.

I have edited the AccordionList.js file like the following way makeListConfig: function() { var me = this, defaultConfig = { scrollToTopOnRefresh: false, indexBar : true, indexBar: { margin:1, listeners: { index: function (html, target, eOpts) { console.log('inside indexbar',target);

                    } // tap

                }

            }

Now the list is showing the index bar. But some issues there, after press any Letter from index bar the list is sorting accordingly. After sorting i cannot touch any list elements. When i touch any list element, the index bar event is firing.

I don't know the proper way to include index bar in to your accordion. Please help me to solve this issue. Your help is much appreciated. Thanks in advance.

I have create a sample app with the same problem, please find the app from the following url

https://docs.google.com/file/d/0BxWBe4mOYNTgb0dHb1RoNU9laVk/edit?usp=sharing

shinobukawano commented 11 years ago

Hi dibishks,

Thank you to share the sample repository, I checked it.

To tell the truth, it seems very dificult problem to work fine with index bar..

I will try it, but I'm afraid that it takes much time to fix it.. Please give me a few weeks.

dibishks commented 11 years ago

Thanks for the quick reply..

dibishks commented 10 years ago

I know you place tremendous value on your time so I’ll be brief, i tried so many ways to fix this thing but no success. Please look in to it when you get free time, Thank in advance.

shinobukawano commented 10 years ago

Sorry to my slow response. Actually I'm very busy this month but I may get plenty of time at next month. so I plan to fix this issue next month. I'm sorry to bother you..

dibishks commented 10 years ago

Its Ok Kawanoshinobu, Thank you for your attention to this matter..

shinobukawano commented 10 years ago

Hi dibishks,

Sorry for my slow response, anyway, I've fixed this issue.

You can check this feature at demo site. grouped tab's list is so.

http://docs.kawanoshinobu.com/accordionlist/

First of all, if we use index bar in accordion list, we should grouping the record. I created new store class in example, please check out example/app/store/Grouped.js

https://github.com/kawanoshinobu/Ext.ux.AccordionList/blob/master/example/app/store/Grouped.js

This store required some config. The one is grouped and the one is folderSort. Accordion list not use folder sort, but we need to set it true and override updateFolderSort method to meaningless because TreeStore require this config is true if we grouping it.

Second, I added some code to AccordionList.js

To add this feature to your app, please check following diffs. To tell the truth, I added some hacks to work it..

https://github.com/kawanoshinobu/Ext.ux.AccordionList/commit/5244ec0bd9b13d369620cd8bc4dbbbcd029fce24 https://github.com/kawanoshinobu/Ext.ux.AccordionList/commit/e825300a4914b1389f2480ccbeb80f126d7653fc

And, we have one big problem.. Maybe this feature is really slow.. TreeStore's sort is too much cost. I tried to fix it but I couldn't.. I continue to fix this problem, but anyway I closed this issue.

Can you check it?

Regards.

dibishks commented 10 years ago

Thank you so much for your effort.. I will check and let you know the feedback...

dibishks commented 10 years ago

HI Kawanoshinobu,

You saved me a whole lot of time - its working well, only problem is its very slow when sorting the accordion list. Because of that am using a server side sorting. Thank you so much for your help.

dibishks commented 10 years ago

HI Kawanoshinobu,

Now i have reached at the end of my project, am using your plugin in number of places, its working great. Thank you so much for your help and support. I have a small issue in LIst Index, here am using server side sorting. So when a user tap on any index am sending it to my server and getting the sorted list. To achieve that i need to clear my store each time using the following code

store = Ext.getStore('Contactsstore'); store.removeAll();

Then to load store again store.load();

My problem is when i try to clear store using remoeAll(), its taking too much time to clear records. Its working fast when store contain minimum number of records. But in my case am caching records in list ( store.setClearOnLoad(false);). Is there any other way to remove store quickly ? Please guide me in right direction.. Thanks

shinobukawano commented 10 years ago

Hi dibishks,

This is just a quick note..

Now, I cannot take a time for it.. I will check it at this weekend o

dibishks commented 10 years ago

HI Kawanoshinobu,

Thanks for quick reply. I have managed to solve this store = Ext.getStore('Contactsstore'); store.data.clear();

Thanks for your support..

shinobukawano commented 10 years ago

Wow, you are great! I hope your project will go well :)

And if possible, I want to try your app someday.

Cheers!

dibishks commented 10 years ago

HI Kawanoshinobu, Its my pleasure...Thanks