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

selectionType as a variable #995

Open
nickhellmich opened this issue Sep 15, 2017 · 2 comments · May be fixed by #2182
Open

selectionType as a variable #995

nickhellmich opened this issue Sep 15, 2017 · 2 comments · May be fixed by #2182

Comments

@nickhellmich
Copy link

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
I'm not exactly sure if this is a bug or if I'm just not implementing properly. I want to change the selectionType on the fly. I realize the [selectionType] wants a value like "'multi" and I've tried several ways to do that.

Expected behavior
I can set selectionType via a variable.

Reproduction of the problem
http://plnkr.co/edit/dEskVNUzz4Npb38s0quX?p=preview

What is the motivation / use case for changing the behavior?
We have users that prefer a variety of selection behaviors depending on the situation.

Please tell us about your environment:
Windows

  • Table version: 0.8.x
    0.8.x

  • Angular version: 2.0.x
    4.2

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    Any

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Typescript 2.4.0

@wizarrc
Copy link
Contributor

wizarrc commented Sep 23, 2017

@nickhellmich you aren't using Angular binding correctly. See my plunker fork with added styles to see the difference. http://plnkr.co/edit/Ua2uWNjGjDNhIvW7F1sC

Here's what I changed:

[selectionType]="selectionType"
multi = "multi"; // Previously was multi = "'multi'";
multiClick = "multiClick"; // Previously was multiClick = "'multiClick'";

Edit: Here is your plunker forked with the above changes. http://plnkr.co/edit/VmktbLs5BUcD07wQoSrj?p=preview

@edjm1971
Copy link

@wizarrc I know this is an old post of yours but can you explain from your plnkr why some of the template for the data table use double quotes, single quotes, and both at the same time. I'm learning this stuff and I cannot find any explanation for this.
I've been battling the data table to force the user to use the CTRL and the Shift key to multi select but it is ignoring my value no matter how I am setting "multi".

@UserJHansen UserJHansen linked a pull request Jun 30, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants