Allow functions as keys
See original GitHub issue#261 discusses the issues with the type definitions with nested keys, but the resolution is not type safe. To make it type safe, functions could be allowed as keys (e.g. keys: [item => item.foo.bar]
) as described by @ceymard.
This also allows for simplifying the case of searching derived fields such as full name e.g. item => `${item.firstName} ${item.lastName}`
which faces issues similar to those described in #302. Obviously, an intermediate object could be used for this, but that seems excessive compared to having functional keys to search.
I’d be happy to implement a PR for this if the behavior is desired.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Simple Ways to Enable Function Keys: 4 Steps (with Pictures)
Hold down the Fn key. This key is usually found in the bottom-left corner of your keyboard next to the Ctrl or Control...
Read more >How do I use the Fn key/F Lock key/Alternate command keys?
To enable FN Lock on the All in One Media Keyboard, press the FN key, and the Caps Lock key at the same...
Read more >How To Use Function Keys Without Pressing Fn Key On ...
Method 1. Toggle the Fn Lock key ... Some keyboards, most commonly laptop keyboards, come with a dedicated Fn Lock key. Pressing this...
Read more >How to Enable / Disable Fn Key to Use With Action / Function ...
In this tutorial, you will learn to lock/unlock the Fn Key behavior by changing the BIOS Setting. Learn Also: How to Fix Cannot...
Read more >In JavaScript how can I use a function parameter as the key to ...
Use the conventional Object syntax. function myFunc(key, value) { myObj = new Object(); myObj[key] = ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t use this library anymore for now, feel free to go ahead.
Thank you.
Le ven. 21 juin 2019 à 22:39, Matt Tingen notifications@github.com a écrit :
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days