66import uuid
77import warnings
88from base64 import b64encode
9- from copy import deepcopy
109from pathlib import Path
1110
1211import numpy as np
@@ -475,7 +474,7 @@ def set_default_options(kwargs, use_to_html):
475474 and not option .startswith ("__" )
476475 and option not in {"dt_bundle" , "find_package_file" , "UNPKG_DT_BUNDLE_URL" }
477476 ):
478- kwargs [option ] = deepcopy ( getattr (opt , option ) )
477+ kwargs [option ] = getattr (opt , option )
479478
480479 for name , value in kwargs .items ():
481480 if value is None :
@@ -598,7 +597,11 @@ def html_table_from_template(
598597 connected_import = (
599598 "import {DataTable, jQuery as $} from '" + UNPKG_DT_BUNDLE_URL + "';"
600599 )
601- local_import = "const { DataTable, jQuery: $ } = await import(window._datatables_src_for_itables);"
600+ local_import = (
601+ "const { DataTable, jQuery: $ } = await import(window."
602+ + DATATABLES_SRC_FOR_ITABLES
603+ + ");"
604+ )
602605 output = replace_value (output , connected_import , local_import )
603606
604607 output = replace_value (
@@ -607,10 +610,6 @@ def html_table_from_template(
607610 html_table ,
608611 )
609612 output = replace_value (output , "#table_id" , "#{}" .format (table_id ))
610- if not connected :
611- output = replace_value (
612- output , "_datatables_src_for_itables" , DATATABLES_SRC_FOR_ITABLES
613- )
614613
615614 if column_filters :
616615 # If the below was false, we would need to concatenate the JS code
0 commit comments