Git Product home page Git Product logo

algolia-materialize-jekyll's People

Contributors

chadokruse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

doc22940

algolia-materialize-jekyll's Issues

Switch to Materialize plugin for sortBySelector

Currently we do not use Materialize styling for the sortBySelector widget as the Materialize widget needs to be initialized AFTER the element is rendered by Instantsearch.

As a interim hack, we simply adjust the styling of the select element and do not use the Materialize select plugin.

The TODO is to figure out how best to initialize the Materialize plugin in the normal Instantsearch flow.

Other widgets have the templates API which can take a function, but the sortBySelector does not.

Adding a full custom widget seems unnecessary, though as of last November it was the recommended method.

Instantsearch does provide the render method, but haven't yet figured out how to implement.

Have attempted initializing via a partial custom widget, but that simply renders another widget which has no interactivity with Instantsearch.

search.addWidget({
    render: function(options) {
      $('select').material_select();
    }
  });

Have also tried forcing init into the normal Instantsearch addWidget workflow:

search.addWidget(
    {
      init: function(options) {
        $('select').material_select();
      }
    },
    instantsearch.widgets.sortBySelector({
      container: '#ais-widget-sort-by',
      cssClasses: {
        root: 'input-field'
      },
      indices: [
        {name: 'demo', label: 'Most relevant'},
        {name: 'demo_amount_desc', label: 'Grant size'},
      ]
    })
  );

Mobile - fixed nav disappears at times

To reproduce:
Open site in Chrome or Safari on an iOS device.
Start entering text in search box (prior to the search box becoming pinned to the top)
Search box disappears after typing first letter

Works normally if the typing begins AFTER pushpin applies the pinned class

Confirmed on iOS Chrome + iOS Safari
Able to reproduce via Simulator

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.