Giter Club home page Giter Club logo

ssuggestor's People

Contributors

carloluis avatar rrivem avatar san650 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ssuggestor's Issues

delay on suggestion prop change

Steps to reproduce

change suggestion list (component props)

Expected Behavior

change suggestions on next render

Actual Behavior

change suggestions when filter is done

Version

v0.0.28

keyboard nav

Select an issue type

  • bug
  • new feature

Bug template

Test Case

Steps to reproduce

Expected Behavior

Actual Behavior

Version


New Feature template

Description

Would be awesome if can use up/down and enter key to select.

classSchema feature request & missing classes on <li> elements

Do you want to request a feature or report a bug?

  • feature
  • bug

I want to request a feature.

What is the current behavior?

  1. Using ssugestor in a Bootstrap 4 environment still makes it output HTML with classes relevant to Bootstrap 3, specifically glyphicon.

    More generally, there is no way to adjust the classNames for each of the HTML elements in the module's output.

    For example, there is no way to configure the module if we didn't want form-control to be on the <input> element, or if instead of glyphicon we wanted to use fa fa-window-close (Font Awesome).

  2. The active <li> element does not have a class of its own, so it's impossible to target it using your own CSS. In fact, no <li> element has a class.

What is the expected behavior?

  1. It would be nice if we could pass in an object to set each of the classNames, like:
<Suggestor
    list={['suggestion-a', 'suggestion-b', 'suggestion-c', '...', 'suggestion-z']}
    arrow
    close
    classSchema={{
        root: 'input-group',
        arrowExpand: 'flashing',
        arrowRemove: 'fa fa-window-close',
        list: 'dropdown-menu'
        itemInactive: 'text-muted',
        itemActive: 'text-primary'
    }}
/>
  1. Just an idea: auto-detect what CSS framework is in effect and apply the relevant classSchema accordingly?

    Or have pre-made classSchema for Bootstrap 3, Bootstrap 4, etc., so we can just import that from suggestor, and apply it ourselves.

  2. The <li> elements should have a specific class instead of just inline CSS. Bootstrap has dropdown-item for this exact purpose. Also, the active <li> element uses an active class (in addition to the dropdown-item it's already using).

    Furthermore, I stongly suggest removing almost all inline CSS, and replace them CSS classes for styling. This would allow users to customize much more freely, and also helps separate “style” from “layout”.

If this is a feature request, what is motivation or use case for changing the behavior?

I was using Bootstrap 4 and this module was exactly what I needed. But I realised it used Bootstrap 3 classes to style itself so I thought that could be fixed.

Additional information

Relevant versions:

  • ssuggestor 0.9.1.
  • bootstrap 4.1.1

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.