Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle on index screen #15

Closed
ecano08 opened this issue Oct 1, 2019 · 7 comments
Closed

Toggle on index screen #15

ecano08 opened this issue Oct 1, 2019 · 7 comments

Comments

@ecano08
Copy link

ecano08 commented Oct 1, 2019

Hi! It's a great feature but I have a doubt, I try to add a toggle field in the index but only display a dot with red or green color, I'm not sure if I am missing something or why It's not working, can somebody explain me? Thanks

@davidpiesse
Copy link
Owner

Hi @ecano08 ,

That is the current functionality. The index screen does not include a toggle - but just a true/false indicator (the dot).

If you want you can PR any new functionality and I'll add it in :)

D

@bernhardh
Copy link
Contributor

bernhardh commented Dec 9, 2020

Maybe I missunderstand something, but this is already implemented in master (editableIndex), right? Its just not documented, nor it is included into the released versions.

Could you please release this functionality? Would be great! Would also solve #11

Edit: Now I saw, that it is already included in 0.0.7 but this version isn't available for composer - see https://packagist.org/packages/davidpiesse/nova-toggle

Maybe update your packagist settings?

@davidpiesse
Copy link
Owner

You are right @bernhardh !
It's not yet documented - but it should be useable and in a pre-release version (0.0.7).
Could you check you see it if you upgrade to this version?

If so I will ensure that this goes to full release asap.

@bernhardh
Copy link
Contributor

See updated comment. I saw it now, that its in 0.0.7, but this isn't available over composer (github autosync disabled/broken)?

@bernhardh
Copy link
Contributor

bernhardh commented Dec 9, 2020

Using dev-master now. Documentation would be great for other users. Thanks for your great package.

@bernhardh
Copy link
Contributor

Sorry to spam these comments. It doesn't work. I can see the toggle and click it, but it doesn't send a request, so it does nothing.

@davidpiesse
Copy link
Owner

No worries.
The same code is used in both the form field and the index field - but obviously they do not work the same.
What I think should happen is the Index field would have to send off a request to update that specific model & field via an ajax request.
So right now this hasn't been implemented and would need to be added.
TODO: Add API call using axios to update the resource with the new value for the field.

PR very welcome to add this in! :)

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

No branches or pull requests

3 participants