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

Allow setting tooltips #371

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Conversation

jtotht
Copy link
Contributor

@jtotht jtotht commented Aug 26, 2022

The new tooltip field of the ListItem class makes it possible to add extended information as a tooltip. Also refactor the component a bit so that the new field needs to be handled only at one place.

Fixes #317

@jtotht
Copy link
Contributor Author

jtotht commented Oct 12, 2022

Hi @NileshPatel17, could I get a review on this? It’s necessary to fulfill a business requirement, and we’re currently working it around by referencing a package built locally from my fork, but it results in extra work for each developer and a continuously dirty local Git repo in the dependent project (I can’t commit the change to package.json, as the local path is potentially different on each developer machine), so I’d like to return to the NPM version as soon as possible.

@NileshPatel17
Copy link
Owner

NileshPatel17 commented Oct 12, 2022

@jtotht will take a look, and if all looks good, will merge and publish new version.

@guerreda1095
Copy link

Hi @NileshPatel17 , have you taken a look at this Pull Request already, this is an important upgrade that will benefit many users. Thanks in advance!

@NileshPatel17
Copy link
Owner

@guerreda1095 added review comment, did not hear it back.. please fix it, and i will merge..

@guerreda1095
Copy link

@NileshPatel17 I'm not seeing any new pending comment to review, @jtotht are you able to see Nilesh's comments?

@jtotht
Copy link
Contributor Author

jtotht commented Nov 3, 2022

No, I don’t see any review comments either, neither here nor in the diff view. Are you sure @NileshPatel17 that you actually published them?

@NileshPatel17
Copy link
Owner

NileshPatel17 commented Nov 3, 2022

No, I don’t see any review comments either, neither here nor in the diff view. Are you sure @NileshPatel17 that you actually published them?

I wonder, why you do not see review comment.

here is the link, https://github.com/NileshPatel17/ng-multiselect-dropdown/pull/371/files#diff-32a865e149b5c9b57ca8fa46f97a3499a97842afb9c36b5b076c9968e0fc3505

once you fix it, i will merge the code and publish new version.

@jtotht
Copy link
Contributor Author

jtotht commented Nov 4, 2022

I also wonder (I haven’t encountered any such issues on GitHub before), but I still don’t see it – I see that your link leads me to the diff of multiselect.model.ts, but not your review comment. Maybe the easiest is that you paste your feedback here in the conversation instead of trying (and not succeeding) to use the inline comment feature.

@jtotht
Copy link
Contributor Author

jtotht commented Nov 7, 2022

Or if you feel like it, you can do the changes yourself and push them to my fork so that they become part of this PR – as a maintainer, I’ve granted you push right to the 317-tooltips branch in my fork.

@NileshPatel17
Copy link
Owner

NileshPatel17 commented Nov 8, 2022

@jtotht please make below change. rest all is good. tooltip will always be string, can not be number.

replace this

export class ListItem {
  id: String | number;
  text: String | number;
  tooltip?: String | number | undefined;

with

export class ListItem {
  id: String | number;
  text: String | number;
  tooltip?: String | undefined;

The new `tooltip` field of the ListItem class makes it possible to add
extended information as a tooltip. Also refactor the component a bit so
that the new field needs to be handled only at one place.

Fixes NileshPatel17#317
@jtotht
Copy link
Contributor Author

jtotht commented Nov 9, 2022

Good point, fixed.

@NileshPatel17 NileshPatel17 merged commit 965cec7 into NileshPatel17:master Nov 10, 2022
@NileshPatel17
Copy link
Owner

NileshPatel17 commented Nov 10, 2022

@jtotht published new version 0.3.9. Pleaser test and let me know if it works or not.

its not working for me at least with angular 14
https://stackblitz.com/edit/angular-ivy-h7tdrm?file=src/app/app.component.ts

I get this error

Error: NG0302: The pipe 'multiSelectFilter' could not be found in the 'MultiSelectComponent' component. Verify that it is declared or imported in this module. Find more at https://angular.io/errors/NG0302

jtotht added a commit to jtotht/ng-multiselect-dropdown that referenced this pull request Nov 11, 2022
Fix an actually failing test written by me in NileshPatel17#371. Also fix some tests
(one introduced by me and some others that have already been there) that
weren’t marked as failures, but threw TypeErrors during the test runs.
@jtotht jtotht mentioned this pull request Nov 11, 2022
@jtotht
Copy link
Contributor Author

jtotht commented Nov 11, 2022

Thanks for merging and publishing! I have no idea what’s going on with the StackBlitz example – I can’t go into the actual implementation files of ng-multiselect-dropdown (only in some TypeScript declaration files) on stackblitz.com, and when I download it, not even npm i succeeds due to conflicting package versions. In my own Angular 13 project, it works perfectly.

However, I do know why the CI job failed, so I submitted a PR to fix it: #379. (It would’ve been better if CI ran earlier, and I could fix the failure in this PR, but better late than never.)

@naveenpra17
Copy link

Hi team
Trying to add the tool tip in the multi select settings but it is not working. Can you please help
https://stackblitz.com/edit/ng-multiselect-dropdown-g8keem?file=src/app/app.component.ts

@jtotht
Copy link
Contributor Author

jtotht commented Dec 13, 2022

You requested version 0.22.11 of this package. There’s no such version; the latest version (and the one that contains this pull request) is 0.3.9. I don’t know what NPM does when you specify a version that doesn’t exist, but don’t expect it to work.

@Rahul-codoffer
Copy link

@NileshPatel17 did you remove this feature in latest version [1.0.0] ?

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 this pull request may close these issues.

Please add tooltip for dropdown elements
6 participants