Comments (25)
Just do that:
// Initialize all input of tags type.
var tagsinput = bulmaTagsinput.attach('[type="tags"]');
from bulma-tagsinput.
Thanks. I'll keep you in touch
from bulma-tagsinput.
no that's the right way.
I don't understand why it's not working with "import" :-(
from bulma-tagsinput.
Hi, the documentation is outdated. Please call the .attach()
static method to init the plugin on the input.
I'm currently working on the big issue with the integration into Laravel then I'll update all extensions and documentation.
Sorry for the inconvenience.
from bulma-tagsinput.
I tried this:
import Tagify from 'bulma-tagsinput/dist/bulma-tagsinput.min'
document.addEventListener('DOMContentLoaded', function () {
Tagify.attach()
})
but i get Tagify is not defined
in the console.
also, i'm currently using this in a Laravel project, can you tell me what exactly you're working on?
from bulma-tagsinput.
I'm currently working with another user on is issue with laravel integration and I found the following process to follow to get it work (for carousel extension):
-
add "laravelcollective/html": "5.*" to composer.json then run "composer update"
-
in app.php: add this provider: Collective\Html\HtmlServiceProvider::class,
-
then these aliases:
'HTML' => Collective\Html\HtmlFacade::class,
'Form' => Collective\Html\FormFacade::class -
in webpack.mix.js update the mix command to:
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.copy('node_modules/bulma-carousel/dist/bulma-carousel.js', 'public/js'); -
in your view (welcome.blade.php) add the following at the end:
{!! HTML::script('js/bulma-carousel.js') !!}
<script>
var carousels = bulmaCarousel.attach();
</script>
from bulma-tagsinput.
you should have bulmaTagsinput defined, not Tagify
from bulma-tagsinput.
import bulmaTagsinput from 'bulma-tagsinput/dist/bulma-tagsinput.min'
document.addEventListener('DOMContentLoaded', function () {
bulmaTagsinput.attach()
})
Console:
ReferenceError: bulmaTagsinput is not defined
from bulma-tagsinput.
Where (which file) do you put the import ?
Why not just including js file directly into your view and then just call bulmaTasgInput.attach() as I show 2 posts above ?
from bulma-tagsinput.
i import bulma-tagsinput.min.js
in my app.js
file. because it's better to have a single js file and a single request. it shouldn't be any different, right?
from bulma-tagsinput.
from bulma-tagsinput.
You issue is related to Laravel integration so I only know 2 ways for it to work:
- Use the flow I gave you
- Recompil sources by yourself with your own webpack configuration
Regards
from bulma-tagsinput.
Thank you
The first option is not an option for me because I have to keep my requests minimal.
I don't know how to do the second option.
Here's how I made it work for now. I moved my attach()
call to app.js
instead of the page where I need it. The downside is it will be called in every page.
Looking forward to the Laravel integration.
from bulma-tagsinput.
If bulmaTagsInput is defined within your app.js. Why don't just reference it into window global variable then you should be able to call the .attach() only on the page you want.
from bulma-tagsinput.
Isn't that what import
should do?
I'm also using sweetalert
and it works in all files just fine without making a new global variable.
from bulma-tagsinput.
I'll try to have a look at sweetalert to check what's different.
Can you please give me the sweetalert repo url to be sure to look at the right one ?
from bulma-tagsinput.
Sure:
https://github.com/t4t5/sweetalert
https://sweetalert.js.org/docs/
Thank you
from bulma-tagsinput.
Can you please try with the last commit ?
https://github.com/Wikiki/bulma-tagsinput/blob/master/dist/js/bulma-tagsinput.js
from bulma-tagsinput.
I get bulmaTagsinput is not defined
.
To be fair I copied the code to my final compiled file since I didn't know how to use the latest commit without upgrading the npm package. Could that be the problem?
from bulma-tagsinput.
Thanks anyway.
Maybe we can fix this later.
from bulma-tagsinput.
I think this is a case issue: try both: bulmaTagsinput and bulmaTagsInput (i of input in lower and upper case)
from bulma-tagsinput.
Tried both. No luck.
from bulma-tagsinput.
please try last release
from bulma-tagsinput.
please try last release
from bulma-tagsinput.
Thank you mohamdio!
from bulma-tagsinput.
Related Issues (20)
- Breaking changes after 0.2.1 HOT 2
- Deleted tags result in leading commas
- feature: configure delimiter keys HOT 5
- Eliminates bottom padding HOT 2
- How to restart tags (in Vuejs) HOT 4
- Not working (using "bulma-extensions": "^2.2.1") HOT 3
- How do you get this to work? HOT 4
- Tags don't respond to clicks on mobile devices? HOT 1
- Angular/Electron SourceMap Error
- Delete and Set Tags Input programmatically HOT 1
- Any compat with Typedhead ? HOT 2
- SyntaxError: import declarations may only appear at top level of a module HOT 1
- Input field isn't centered HOT 1
- Feature request: Allow support for Bulma size modifiers HOT 1
- How to import bulma-tagsinput in Angular 7? HOT 2
- Tag Appearance Not Like Documentation HOT 1
- Text Area for Tags is offset to the bottom HOT 5
- The automated release is failing 🚨 HOT 1
- is there anyone maintaining this repo? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulma-tagsinput.