GithubHelp home page GithubHelp logo

snapappointments / bootstrap-select-temp Goto Github PK

View Code? Open in Web Editor NEW
161.0 161.0 28.0 5.5 MB

Development of bootstrap-select is officially located at snapappointments/bootstrap-select. This repository is a remnant of the transition process.

Home Page: https://github.com/snapappointments/bootstrap-select

JavaScript 56.46% CSS 1.80% PowerShell 1.77% HTML 39.98%

bootstrap-select-temp's People

Stargazers

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

Watchers

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

bootstrap-select-temp's Issues

Uncaught TypeError: Cannot read property 'Constructor' of undefined

I am using Angular 5 and Boostrap 4.
Installed boostrap-select v1.13.0-beta.
loading app shows below error.
screenshot_10

I made sure that jQuery is being loaded before boostrap-select.js
When I use boostrap-select v1.12, it does not show this error, but dropdown is not working with this version.

select in navbar (update error)

bootstrap-select 1.13.0-beta, bootstrap 4

Opening a select in a navbar a second time (open -> close -> open) leads to the error
Uncaught TypeError: Cannot read property 'update' of null

Responsible code line
if (this.dropdown) this.dropdown._popper.update();

Live example

Update: From the bootstrap docs

Popper.js isn’t used to position dropdowns in navbars though as dynamic positioning isn’t required.

Background color, border and selected row color are different from bootstrap 3

Please see this Plunker: https://plnkr.co/edit/27bFFrsp1wBaUAowclhP

It is a simple bootstrap-select using bootstrap 4 and bootstrap-select v1.13.0-beta.

The background color of the select element is Athens Gray (#f8f9fa) It has no border, and the selected row color is blue. See images below.

How do I get the standard style from bootstrap 3 (https://silviomoreto.github.io/bootstrap-select/examples/)? Do I really need to do custom styling to get that?

bootstrap4-select01

bootstrap4-select02

LiveSearch in bootstrap4

  1. in Safari LiveSearch does not work
  2. if there are several selectpiker on the page, then the LiveSearch focus remains on the latter, but it is necessary that the focus should be stylized when expanding select

Unexpected val() event behavior

The change introduced in snapappointments/bootstrap-select#1303, such that calling val() emits a change event, is inconsistent with common practice, and, at least in our case, induced a lot of breakage, as it tends to introduce events before handlers are ready for them.

I'm a bit puzzled as to the rationale for the change; val() doesn't typically work this way. As reference, from the canonical val() documentation, http://api.jquery.com/val/:

Setting values using this method (or using the native value property) does not cause the dispatch of the change event. For this reason, the relevant event handlers will not be executed. If you want to execute them, you should call .trigger( "change" ) after setting the value.

I think if something as basic as event behavior is going to be different from how it's worked in the past and different from common practice, there should be much more of a warning present in the change log.

However, frankly, it's not without good reason that that's not normally the way val() works, so again, I'm puzzled by what seems to be an odd choice here.

Can't choose select option if bootstrap-select is nested within dropdown-menu

If I put bootstrap-select input inside a .dropdown-menu, I won't be able to choose anything from it; the options dropdown simply doesn't open on click. I am referring to that particular feature: https://getbootstrap.com/docs/4.0/components/dropdowns/#menu-forms

If I understand correctly, this issue is due to the fact that bootstrap4 doesn't support nested dropdowns (twbs/bootstrap#21026). If so, is there any workaround to make bootstrap-select usable in dropdown-menus?

.empty() method is not working

I'm trying to empty the contents of a select dropdown menu and it seems like it only works when the first item is selected.

Here's the example

When the second or third value is selected in the dropdown and the button is pressed to empty the contents, it clears out the selection. However if you click on the dropdown again, all of the values are still there.

If the 1st value of the dropdown is selected and the button pressed, then it seems to work fine.

Select not visible inside modal bootstrap 4

I'm using it with Thymleaf and Bootstrap 4.
I need to use it inside a modal, but it doens't appear..
Why?

I just tried this:

......
<div class="modal-body">
					<select id="lunchBegins" class="selectpicker" data-live-search="true" data-live-search-style="begins" title="Please select a lunch ...">
  <option>Hot Dog, Fries and a Soda</option>
  <option>Burger, Shake and a Smile</option>
  <option>Sugar, Spice and all things nice</option>
  <option>Baby Back Ribs</option>
  <option>A really really long option made to illustrate an issue with the live search in an inline form</option>
</select>

.....
</div>

Uncaught Type Error

I am using Bootstrap 4 with Pug (Using Bootstrap-select version 1.13.0 ), and my code is

                                    label Select A Category
                                    select.selectpicker(data-live-search='true')
                                        option a
                                        option ab
                                        option abc
                                        option abcd
                                        option abcde

Whenever I type in the box
image

All the related options are not showing and it shows the below messages:
error

Switch to SASS as CSS compiler

As Bootstrap 4 is now using SASS, it makes sense to switch to that to remain consistent. Support for LESS will be kept for as long as it makes sense. It will ultimately be necessary anyway once the bootstrap-select bundle files are available (bootstrap-select code bundled with necessary Bootstrap code - useful if you're not already using Bootstrap in your project).

noneSelectedText not working in v.1.13.0

Bug:
The noneSelectedText isnt showing up at all.
It has worked in v.1.12.4.

How to reproduce the bug:
HTML:
<select class="btn-group form-control selectpicker m-0" data-show-subtext="true" data-selected-text-format="count" data-live-search="true" multiple="multiple"> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> </select>
JS:
$('.selectpicker').selectpicker({ size: 8.4, noneSelectedText: '<span class="placeholder">Choose multiple</span>', });

1.12.4 output is like this:
<button type="button" ... title="Choose multiple" ...><span class="filter-option pull-left"><span class="placeholder">Choose multiple</span></span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button>

1.13.0 output is like this:
<button type="button" ... title ...><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div><span class="bs-caret"><span class="caret"></span></span></button>

So "Choose multiple" doesnt get set, nor in the title or the element itself inside the button.
Does somebody know how to fix this?

Support for input-group-prepend

Currently, the input-group-prepend (input group addon) does not render correctly. It both is too small in width and maintains rounded corners on the side with the addon.

jQuery 3.1.1
Bootstrap 4.0.0
bootstrap-select 1.13.0-beta

Here is a live example that shows both a correctly and incorrectly displayed dropdown: https://jsfiddle.net/p3xe2753

FontAwesome instead of glyphicons

With Bootstrap 4, Glyphicons is no longer included as standard. As such, some have opted to use FontAwesome instead.

I know that the js automatically adds the "glyphicon" class when data-icon is used. Is there a cheat which will make it add the "fa" class instead? The new Fontawesome version also has fas and far classes for variations on the icons.

how to force selectpicker to open like a bootstrap dropdown inside a parent element

Is it possible to make the selectpicker, act like a bootstrap dropdown when it expands within a navbar like so?
2855ae9e-d6ca-460c-b77b-8e09cacc785f

I wish to make a selectpicker vertical list when it is in mobile mode, so when you select a particular select, it expands inside the main parent and not overflows outside like it normally would.

Does that make sense, and if so, can it be tweaked to do so?

Bower compatibility

Thanks for your work regarding Bootstrap-select.

I know Bower isn't the hottest thing anymore, but some build processes still depend on it.

Would you be willing to accept a PR adding support for Bower, via a bower.json?

{
  "name": "bootstrap-select",
  "description": "Bootstrap-select is a jQuery plugin that utilizes Bootstrap's dropdown.js to style and bring additional functionality to standard select elements.",
  "main": [
    "less/bootstrap-select.less",
    "dist/css/bootstrap-select.css",
    "dist/js/bootstrap-select.js"
  ],
  "authors": [
    "Casey Holzer"
  ],
  "license": "MIT",
  "keywords": [
    "form",
    "bootstrap",
    "select",
    "replacement"
  ],
  "homepage": "https://developer.snapappointments.com/bootstrap-select",
  "dependencies": {
    "jquery": ">=1.8"
  },
  "ignore": [
    ".gitignore",
    "CONTRIBUTING.md",
    "Gruntfile.js",
    "README.md",
    "composer.json",
    "package.json",
    "test.html",
    "docs"
  ]
}

Data-thumbnail option

I woul like to use image beside text. I found this example Select with Thumbnails here.
But on your latest version 1.12.4 looking the source code this option is not available anymore. How can use images on latest version?

Fatal TypeError 1.13.0: Cant update from 1.12.4 to 1.13.0

1.12.4 is working perfectly.
1.13.0 doesnt work at all.

Steps to reproduce:
Update from 1.12.4 to 1.13.0 through bower:

bower update bootstrap-select

First Bug: Invalid meta desctiption of 1.13.0 (1.12.4 doesnt have this bug)

bower not-cached https://github.com/snapappointments/bootstrap-select.git#^1.13.0
bower resolve https://github.com/snapappointments/bootstrap-select.git#^1.13.0
bower download https://github.com/snapappointments/bootstrap-select/archive/v1.13.0.tar.gz
bower extract bootstrap-select#^1.13.0 archive.tar.gz
bower invalid-meta for:/var/folders/z1/5vz7njdx5qj2zjktbtgf81xm0000gn/T/username/bower/c225966f7f5f71e5c9bdec3a4c8b6550-73520-McjZ31/bower.json
bower invalid-meta The "description" is too long, the limit is 140 characters
bower resolved https://github.com/snapappointments/bootstrap-select.git#1.13.0
bower install bootstrap-select#1.13.0

Second Bug: Cant run 1.13.0 at all, because I get this error message:
TypeError: undefined is not an object (evaluating 't.fn.dropdown.Constructor.VERSION')

The error redirects me to the line:
b.full = (t.fn.dropdown.Constructor.VERSION || "").split(" ")[0].split("."), b.major = b.full[0];

Iam using Safari 11.1 on MacOS, Bootstrap 3.3.7, jQuery 2.2.4 and inserting the script through vendor.json:

"bower_components/bootstrap-select/dist/js/bootstrap-select.min.js",

Any thought on the second bug?
The whole plugin doesnt work without fixing it.

Extra 'caret` icon

Bootstrap 4 comes with a caret icon already append via the :after. This version adds another caret via the 'bs-caret`. I use CSS to display: none for now.

Question: Is there a way to use this component as a "List View"?

First of all I would like to thank you guys for sharing this component with the community, I've used it in quite a few projects until now.

But a requirement of a project that I'm developing is to have a list of items selected/deselected in a similar way of a List View, so the options picker would always be displayed with the "ticker" mark to identify the selected ones, eliminating the <select> entirely.

screen shot 2018-03-28 at 19 45 44

I did not find any option related to this in the docs and before modifying the component I wondered if you guys would suggest any approach to achieve this requirement. The functionality of the component would be very similar to this one: https://google.github.io/closure-library/source/closure/goog/demos/ if you click "Gmail Bugs" or "Reference" the item will then be selected/deselected.

I found some snippets in Bootsnipp (like this one) but as bootstrap-select is wonderful I would prefer to use it instead of the Bootsnipp approach.

I don't know if this is the proper place to be asking questions but I would appreciate any suggestions.

Regards.

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.