https://github.com/tenvili/inquirer-table-select-prompt
Another table select prompt plugin of inquirer.js, with powerful table render and filters.
https://github.com/tenvili/inquirer-table-select-prompt
filtering inquirer inquirer-plugin inquirer-prompt table table-select tui
Last synced: 3 months ago
JSON representation
Another table select prompt plugin of inquirer.js, with powerful table render and filters.
- Host: GitHub
- URL: https://github.com/tenvili/inquirer-table-select-prompt
- Owner: TenviLi
- License: mit
- Created: 2022-09-05T10:22:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-29T08:00:12.000Z (over 2 years ago)
- Last Synced: 2025-01-02T09:14:42.966Z (5 months ago)
- Topics: filtering, inquirer, inquirer-plugin, inquirer-prompt, table, table-select, tui
- Language: TypeScript
- Homepage:
- Size: 55.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# inquirer-table-select-prompt
[](https://www.npmjs.com/package/inquirer-table-select-prompt) [](https://www.npmjs.com/package/inquirer-table-select-prompt) [](https://github.com/gylidian/inquirer-table-select-prompt)
> Table row selection prompt for [Inquirer.js](https://github.com/SBoudrias/Inquirer.js)
## 动机
现有的 inquirer.js 没有支持表格行选中的命令行交互的插件.
社区内能查找到的,只有一个二维数组的 checkbox,[eduardoboucas/inquirer-table-prompt](https://github.com/eduardoboucas/inquirer-table-prompt).
而我更需要的是类似 list/rawlist 的选中表格每一行效果.
因此我开发了一个支持表格行选中的插件,并在这个核心功能的基础上,还添加了诸如 过滤器(`filters`)、过滤器选项卡(`tab`)、过滤器默认值(`filtersDefault`)、分页器(`pagination`)、异步请求数据源(`source`)、直接使用数据(`data`) 等丰富特性.
其中,filters 功能基于 [insightfuls/inquirer-tree-prompt](https://github.com/insightfuls/inquirer-tree-prompt) 二次开发.
## 安装
安装本插件前,请确保项目已安装 inquirer.
```bash
$ npm i inquirer-table-select-prompt
```## 使用
```typescript
inquirer.registerPrompt('table-select', require('inquirer-table-select-prompt'))
```## 例子
查看 [examples/](https://github.com/gylidian/inquirer-table-select-prompt/blob/master/examples) 快速上手.