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

Cannot set properties of undefined (setting 'BootstrapTable') #7510

Closed
virtualdreams opened this issue Sep 19, 2024 · 4 comments
Closed

Cannot set properties of undefined (setting 'BootstrapTable') #7510

virtualdreams opened this issue Sep 19, 2024 · 4 comments
Labels
docs Issues for improving or updating our documentation.

Comments

@virtualdreams
Copy link

virtualdreams commented Sep 19, 2024

Description

This is the only error I get.

bootstrap-table.min.js:10 
 Uncaught TypeError: Cannot set properties of undefined (setting 'BootstrapTable')
    at bootstrap-table.min.js:10:136671
    at bootstrap-table.min.js:10:233
    at bootstrap-table.min.js:10:245
(anonym)	@	bootstrap-table.min.js:10
(anonym)	@	bootstrap-table.min.js:10
(anonym)	@	bootstrap-table.min.js:10

I use Bootstrap 5 and this package and nothing works. What is missing?

<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="stylesheet" href="/static/bootstrap.min.css">
		<link rel="stylesheet" href="/static/bootstrap-table.min.css">
		<title>Test</title>
	</head>
	<body>
		<div class="container">
			<table class="table table-sm table-striped" id="table" data-toggle="table" data-sort-class="table-active" data-sortable="true">
				<thead>
					<tr>
						<th data-field="id" data-sortable="true" scope="col">Name</th>
						<th data-field="combat" data-sortable="true" scope="col">Compatibility Level</th>
						<th data-field="owner" data-sortable="true" scope="col">Owner</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>Name 1</td>
						<td>Combar 1</td>
						<td>Owner 1</td>
					</tr>
					<tr>
						<td>Name 2</td>
						<td>Combar 2</td>
						<td>Owner 2</td>
					</tr>
				</tbody>
			</table>
        </div>
		
		<script language="javascript" type="text/javascript" src="/static/bootstrap.bundle.min.js"></script>
		<script language="javascript" type="text/javascript" src="/static/bootstrap-table.min.js"></script>
	</body>
</html>
@virtualdreams virtualdreams added the docs Issues for improving or updating our documentation. label Sep 19, 2024
@wenzhixin
Copy link
Owner

You need to include the jQuery library.

@wenzhixin
Copy link
Owner

ref #4796

@virtualdreams
Copy link
Author

virtualdreams commented Sep 23, 2024

Ok, thanks for the info. But then this information is missing in the documentation because I haven't found anything like it.

PS: I have now found it as a sub-sentence, but there is no list of what is required.

@wenzhixin
Copy link
Owner

https://bootstrap-table.com/docs/getting-started/introduction/#starter-template

Thanks for your feedback. We will consider adding it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues for improving or updating our documentation.
Projects
None yet
Development

No branches or pull requests

2 participants