Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

IE11 Selectivity React #235

Open
wiktor-obrebski opened this issue May 16, 2018 · 1 comment
Open

IE11 Selectivity React #235

wiktor-obrebski opened this issue May 16, 2018 · 1 comment

Comments

@wiktor-obrebski
Copy link

I had problems with loading selectivity on IE11. I found that the reason is diacritics plugin - it source have some characters that break IE11.
In built Selectivity code I found that this:

const selectivity = require('selectivity/react');

is just shortcut for:

require("./apis/react");
require("./dropdown");
require("./event-listener");
require("./inputs/email");
require("./inputs/multiple");
require("./inputs/single");
require("./locale");
require("./plugins/ajax");
require("./plugins/async");
require("./plugins/diacritics");
require("./plugins/keyboard");
require("./plugins/options-validator");
require("./plugins/react/templates");
require("./plugins/submenu");
require("./plugins/tokenizer");
require("./selectivity");
require("./templates");
module.exports=require("./selectivity");

So, the question is, do all these plugins are necessery for default Selectivity React component? I believe they are not. Especially if they break promised browser support.
For other who have the issue - you can just load needed plugins manually, for me it was:

    require('selectivity/apis/react');
    require('selectivity/inputs/multiple');
    require('selectivity/inputs/single');
    require('selectivity/plugins/react/templates');
    require('selectivity/plugins/submenu');
    require('selectivity/templates');

    const Selectivity = require('selectivity/selectivity');
@glafarge
Copy link
Contributor

Same issue for me with jQuery API.
@psychowico solution works but another was to update the DIACRITICS object with quoted keys like https://github.com/andrewrk/node-diacritics/ did :
https://github.com/dundalek/latinize/blob/cf888cf0120ef53d62bb8d0005813a7e30b56137/latinize.js#L24-L916

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants