-
Notifications
You must be signed in to change notification settings - Fork 63
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
Data table modal buttons not working integrated into an in asp.net core 6 project #12
Comments
It might be related to Bootstrap version, the new web template is probably using Bootstrap 5 versus Bootstrap 4 in this project. Update: It looks like the attributes |
Still no luck after that unfortunately. Testing further it seems that |
Looks like I can get it to show with var userModal = new bootstrap.Modal(document.getElementById('userModal'));
userModal.toggle(); The submit button works to submit, but neither it or the X button close the modal. |
Yeah, looks like you need |
Sweet, thanks. That got the close working. I might put all the changes into a pull request later but not sure how you want to handle bootstrap 4/5 compatibility for older projects. For any other users coming across this, the fixes so far are:
var userModal = new bootstrap.Modal(document.getElementById('userModal'));
var editModal = new bootstrap.Modal(document.getElementById('editModal'));
var pwdModal = new bootstrap.Modal(document.getElementById('pwdModal'));
The only remaining issue seems to be that claims are showing as undefined in the edit dialogue (e.g. the initial Name claim), but show fine in the table. |
And the fix for that is changing |
Thanks for outlining these changes, I've linked to this issue in README. |
Someone asked to see the changes fully apply so I've extracted out an example template here: https://github.com/GSGBen/IdentityManagerUI-NetCore6-Template. |
Just in case somebody prefers this one over your new Blazor Project. The Undefined issue happens as well on Role Claims. Same solution as for User Claims. Changing |
This is strange, I swear I had this working last week and now it's not. I've added the project to a new solution created from a basic Asp.net core 6 Razor Pages web template. I've made all the required changes to get /IdentityManager/Home/Users working and it successfully shows any existing users in the database. However pressing any of the New, Edit, Delete, Password buttons doesn't show a modal. Same with the roles. Nothing happens.
There are no errors in the browser console, and from looking through the code popping up the modal shouldn't trigger any API calls - that should only be on submit (also nothing in Sources).
Any pointers on where I should look to troubleshoot this?
The text was updated successfully, but these errors were encountered: