v25.0.7: Fix distribution file dependencies and production click handler issues
## Major Fix - Production Distribution Dependencies - Fix missing click handlers in production by ensuring proper dependency management - Add select2 to Gruntfile.js common inputs to include it in built distribution - Resolve 'this.$input.select2 is not a function' error in production builds - Update demo to include select2 and bootstrap-datepicker as separate dependencies when using built files ## Dependencies & Usage - Built distribution files now include select2 input type in bootstrap-editable.min.js - Users must include select2 and bootstrap-datepicker separately when using built files: - import 'select2' and 'select2/dist/css/select2.min.css' - import 'bootstrap-datepicker' and 'bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' - This matches standard JavaScript library dependency patterns ## Technical Details - Root cause: JavaScript cascade failure when select2 dependency was missing - Missing select2 prevented entire x-editable initialization, breaking click handlers - Now both webpack source build and Grunt distribution include same input types - Maintains backward compatibility while fixing production deployment issues ## Fixes Production Issues - ✅ Click handlers now properly attach in production - ✅ Form submission logic works correctly - ✅ All input types functional (text, select, select2, date, etc.) - ✅ Proper event binding and library initialization - ✅ No more 'Unknown type: select2' errors
This commit is contained in:
@@ -12,8 +12,13 @@ import "bootstrap-datepicker";
|
||||
import "bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css";
|
||||
|
||||
|
||||
// Import the editable functionality (attaches to jQuery.fn) - using webpack source build
|
||||
require("../src/bootstrap5-editable.js");
|
||||
// Import the editable functionality (attaches to jQuery.fn) - using built distribution
|
||||
// When using built files, you need to include select2 separately for select2 inputs
|
||||
import "select2";
|
||||
import "select2/dist/css/select2.min.css";
|
||||
import '../dist/bootstrap5-editable/js/bootstrap-editable.min.js'
|
||||
import '../dist/bootstrap5-editable/css/bootstrap-editable.css'
|
||||
|
||||
$.fn.editable.defaults.mode = 'inline';
|
||||
|
||||
$(function() {
|
||||
|
Reference in New Issue
Block a user