Announcement

Collapse
No announcement yet.

Customize header for list view

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customize header for list view

    Hello,

    I need to append the filter field value, to the header of resulting list view page, in one of my custom entity.

    Ex:- In accounts if I filter list view values by assigned user, I need to show the assigned user name appended with the heading ACCOUNTS.

    Please help me with this topic.

    Thanks.


  • #2
    Hello
    Override view list, the method getHeader (extends client/src/views/list.js)

    Comment


    • #3
      Hi Tanya,

      getHeader method working, but how to get the filter field value dynamically and add it to getHeader method?

      Can you please help.

      Thanks.

      Comment


      • #4
        I think you need to rerender header view after clicking search button

        Comment


        • #5
          getHeader: function () {

          var header=this.$el.find('input.input-sm').val();

          console.log(header); // displays value correctly

          return '<a href="#">' +header + "</a> ยป " + header;

          this.reRender();

          },
          events: {

          'click .btn[data-action="search"]': function (e) {

          this.getHeader();
          }
          },



          But header is showing undefined.

          Please help

          Comment


          • #6
            Sorry Tanya, My mistake.

            Called reRender function in click event, and it is working.

            Thank you so much for your help.

            And can you please help me in clearing the filter values when returning back to the same page from other pages.


            Comment

            Working...
            X