carloluis / ssuggestor Goto Github PK
View Code? Open in Web Editor NEWreact-simple-suggestor: search with suggestions
Home Page: https://carloluis.github.io/ssuggestor/
License: MIT License
react-simple-suggestor: search with suggestions
Home Page: https://carloluis.github.io/ssuggestor/
License: MIT License
update dependencies and build tool
Allow json objects on suggestion list
change suggestion list (component props)
change suggestions on next render
change suggestions when filter is done
v0.0.28
Update react tests using react-testing-library
Would be awesome if can use up/down and enter key to select.
I want to request a feature.
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 className
s 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).
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.
className
s, 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'
}}
/>
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.
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”.
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.
Relevant versions:
ssuggestor 0.9.1
.bootstrap 4.1.1
Flag: Select only suggestion on list
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.