Okay
  Public Ticket #3641605
Scroll to list when filter selected
Closed

Comments

  • booth_1 started the conversation

    Hi I am building a filtering system on the URL above, I also bought the extra Advance filtering so I could hide all until after a filter is selected, but I need the page to scroll to where the entries will show once a filter is selected. Could you please let me know how I might accomplish this as otherwise the user won't know the list has loaded if they are even a little down the page. Really hope you can help!

    As an aside, could you please point me to some resources for styling the table and filter? I have some knowledge of using CSS but would appreciate some help in finding the best way to target various elements.

    Thanks for your time and hope you had a good Easter!
    Cheers

    Tyrhone

  •  1,846
    Miloš replied


    Hello  Tyrhone,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.


    1. In regards to an 'automated scroll' which would scroll to the part of the page where the 'resulting table' is after a user chooses the sidebar Filters from our filtering Widget;

    8187626259.png


    At the moment we do not have any built-in solution for that.

    You can suggest it to our developers, though - they will do their best to make a solution in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)

    You can also search online if you find a similar solution via Custom JS/JQuery, but at the moment, we also don't have any custom idea to share.

    I will follow up with our developers, though, if they make any kind of a custom idea what you could try, we will report back to share it with you.



    2. When it comes to adding custom styles, there are a lot of possibilities for you to add styles through our plugin.

    First, the easiest way is to check our native / out of the box customization options.

    You can try different table skins ( each table skin has a different pre-made colors, background colors, design etc) ,  in table settings/Customize / Base skin :

    4349562428.png

    If you find a table skin that is the closest to what you need, then you can additionally check the other Customization options, such as Font , Header, Table Borders, Row color, Cell color, Pagination, and in the end you can add your own Custom CSS.

    Here you can check out some basics on how to add CSS to our tables.

    https://wpdatatables.com/documentation/column-features/coloring-and-styling-columns/

    We are limited with our support when it comes to customizations with custom CSS,

    but i can help you with some basic CSS styles and examples, let me know if you need anything specific.


    Please check my reply on your other ticket, where we went in more details on some CSS selectors you can use, for example to style the "Clear filters" element.

    Generally, when I wish to check some selector, the easiest way is to use the 'arrow' which is built in the browser's inspector tool; then click to highlight the element you need;

    and copy selector from HTML.

    5164999952.png
    1244939260.png



    You can find various Guides/tutorials online on different ways how you can use the browser's inspector Tool to get good CSS selectors for various elements, so you can experiment and test how it looks on the Page and Tables.

    Our Support does not cover that, but I hope this helps at least as a starting point.

    Let me know if you struggle with some specific basic modification, but please open a new ticket for that.

    When you have multiple questions or issues which are for different subjects/topics,

     please open a new ticket for each subject, and we will help/advise more effectively. 

    In that way, issues and questions which are related to different subjects will be in separate tickets so other users or our support agents can find them easily. 

    Our policy is to have one issue or question per ticket for the reasons described already.

    Thank you for understanding.


    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • booth_1 replied

    Thanks again Milos, and no worries for the delay.

    Bummer about the no auto scroll but it shouldn't be a deal breaker for my client. Thanks for the tips and links on the styling, I will go through them all now. I often use the inspector to find elements, but embarrassingly I never knew the little arrow on the left there existed to make it simpler! :)

    Thanks again for your time.

    Cheers

    Tyrhone


  •  1,846
    Miloš replied

    Hi Tyrhone,

    Thank you for understanding.

    I am late to reply again, we appreciate all your patience.


    1. In regards to that auto scroll to focus the table after filtering, yes, unfortunately for now we still don't have it.

    Our devs added the feature which auto scrolls for pagination in the new 6.4 update.

    So that is a good sign, they might add that for filtering soon.

    I just cant say an ETA on it.


    2. In regards to CSS, no problem at all.

    I can relate with that( about the arrow), one of our devs showed me that trick when I started here so no worries.smile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • booth_1 replied

    Ok thanks Milos, I will keep an eye out for the feature with fingers crossed!

  •  2,572
    Aleksandar replied

    We also hope it will be implemented at some point in the future, Tyrhone, thanks for your understanding.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • booth_1 replied

    Hi Aleksander, I just noticed that I can get around this issue somewhat if there is a way to force the table to load downwards instead of upwards when it is above the fold. I noticed that if I have scrolled far down enough that the section the table is in is just out of the browser window it will load up and so a user cannot see that a table has loaded, but if the top of the body is in the browser window it will load the table downwards.

    Hopefully there is a way to change this as it would solve not having a scroll to.

    Thanks again.

  •  2,572
    Aleksandar replied

    Hey Tyrhone.

    I'm not aware of any custom code that can do this, but I asked my colleagues if they can help. I'll get back to you as soon as I hear from them.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2,572
    Aleksandar replied

    Hi again Tyrhone.

    We currently don't have any custom code that would help you with this, but our developers mentioned that you can locate the following function on line 2253 in the file /wp-content/plugins/wpdatatables/assets/js/wpdatatables/wpdatatables.js:

    $(document).on('click', '.paginate_button', function () {
                    var tableSelector = $(this)[0].attributes[1].value;
                    if (JSON.parse($('#' + $('#' + tableSelector).data('described-by')).val()).pagination_top) {
                        function paginateScroll() {
                            $('html, body').animate({
                                scrollTop: $('#' + tableSelector + "_wrapper.dataTables_wrapper").offset().top
                            }, 100);
                        }
                        paginateScroll();
                        $(this).closest(tableDescription.selector + "_paginate.paginate_button").off('click').on('click', paginateScroll);
                    }
                });

    In it, you can try altering the button (if you configure the filters so they apply after the "Search Filters" button is clicked).

    Also, there's a function that helps you but it would require custom code:

    window.scrollTo({
                    top: 0,
                    behavior: 'smooth'
                });
    

    Or:

    $('html, body').animate({ scrollTop: 0 }, 'slow');
    

    These are their suggestions, but I can't help you with the actual code that needs to be applied. You need to call the functions based on something and it needs to be triggered by something (a button click, for example). I hope that helps.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • booth_1 replied

    Hi Aleksander, that is unfortunately a bit beyond me and I am likely to break more than I fix. I will keep my fingers crossed and hope you bring the scroll to top functionality or something like it in an upcoming update.

    Thanks for your time

  •  2,572
    Aleksandar replied

    I hope so too, Tyrhone.

    Sorry I couldn't be of more assistance here.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables