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

exFilterColumn: Uncaught TypeError: Cannot assign to read only property '0' of string #404

Closed
lenamtl opened this issue May 17, 2017 · 10 comments
Labels

Comments

@lenamtl
Copy link

lenamtl commented May 17, 2017

I'm getting this error in the console when trying to set a default value.
Uncaught TypeError: Cannot assign to read only property '0' of string 'Yes'
I have tried with different column (datat-type text) and I'm having the same error.
I'm using this code

yadcf.init(table18, [
						
						{column_number : 4, // Active 
							filter_container_id: 'divisions_4',
							filter_type: "multi_select",
							select_type: 'select2',
							select_type_options: {
								width:'100%',
								language: "<?php echo ASLang::getLanguage(); ?>",
								allowClear: true 
							}, 
							filter_default_label: placeholder, // multi-select
							column_data_type: "html",
							html_data_type: "text",
							filter_reset_button_text: false // hide yadcf reset button
					
						},
							
					],
					{cumulative_filtering: false},
					{externally_triggered: true});  
					
					yadcf.exFilterColumn(table18, [
						
						[4, "Yes"]
					]);
@vedmack
Copy link
Owner

vedmack commented May 24, 2017

Please provide a test page in which your issue is reproduced...

@lenamtl
Copy link
Author

lenamtl commented May 24, 2017

Hi,
Here is a jsfiddle to see the errors I'm having.
https://jsfiddle.net/lenamtl/x798d99g/1/

What I d'like to do :
1- is filter some value by default
2- other case display no value by default in the entire table and only show the row if I do a search using Yadcf filters

@vedmack
Copy link
Owner

vedmack commented May 29, 2017

looks like a bug related to multi select and exFilterColumn , will see what went wrong

@vedmack vedmack added the bug label May 29, 2017
@lenamtl
Copy link
Author

lenamtl commented May 29, 2017

ok thanks

@lenamtl
Copy link
Author

lenamtl commented Jun 9, 2017

Any news on how to fix this?

Thanks

@vedmack vedmack closed this as completed in 63e161e Jun 9, 2017
@vedmack
Copy link
Owner

vedmack commented Jun 9, 2017

fixed in 0.9.2.beta.12

@vedmack
Copy link
Owner

vedmack commented Jun 9, 2017

here is a working jsfiddle - use select2 v4 full

as to the "2- other case display no value by default in the entire table and only show the row if I do a search using Yadcf filters" , see how you can do it with datatables and then try to use yadcf for better filtering, you can post a question on stackoverflow if you want

@lenamtl
Copy link
Author

lenamtl commented Jun 9, 2017

Ok thanks for the fix and additional info.
I will do some tests

@lenamtl
Copy link
Author

lenamtl commented Oct 31, 2017

Do you mind telling me which line of code is related to this fix thanks

@vedmack
Copy link
Owner

vedmack commented Nov 2, 2017

@lenamtl here is the relevant diff

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

No branches or pull requests

2 participants