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

enable filter works with table api(not in the footer) #73

Merged
merged 5 commits into from
May 21, 2022

Conversation

alswl
Copy link
Contributor

@alswl alswl commented May 4, 2022

We already have keyword filtering, but this can only be displayed in the footer of the form. If I want a form without a footer, or if I want to have the ability to manually control the filtering feature, I need an API to connect to the form to manipulate it.

Before:

A filtered simple default table
Currently filter by Title and Author, press / + letters to start filtering, and escape to clear filter.
Press q or ctrl+c to quit

┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃        Title┃       Author┃                                       Description┃
┣━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃Computer Sys…┃Randal E. Br…┃This book explains the important and enduring con…┃
┃Structure an…┃Harold Abels…┃Structure and Interpretation of Computer Programs…┃
┣━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃                                                                     /com  1/1┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

New sytle:

A filtered simple default table
Currently filter by Title and Author, press / + letters to start filtering, and escape to clear filter.
Press q or ctrl+c to quit

> com 
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃        Title┃       Author┃                                       Description┃
┣━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃Computer Sys…┃Randal E. Br…┃This book explains the important and enduring con…┃
┃Structure an…┃Harold Abels…┃Structure and Interpretation of Computer Programs…┃
┗━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

examples/filterapi/main.go Outdated Show resolved Hide resolved
examples/filterapi/main.go Outdated Show resolved Hide resolved
table/filter_test.go Outdated Show resolved Hide resolved
table/options.go Outdated Show resolved Hide resolved
table/options.go Outdated Show resolved Hide resolved
table/model.go Outdated Show resolved Hide resolved
@Evertras
Copy link
Owner

Evertras commented May 6, 2022

I generally agree with the idea of this, just some things that I think we should clarify.

table/options.go Outdated Show resolved Hide resolved
table/options.go Outdated Show resolved Hide resolved
alswl and others added 2 commits May 14, 2022 16:13
Co-authored-by: Brandon Fulljames <bfullj@gmail.com>
Co-authored-by: Brandon Fulljames <bfullj@gmail.com>
@alswl
Copy link
Contributor Author

alswl commented May 21, 2022

ping @Evertras

@Evertras
Copy link
Owner

Ah, sorry! LGTM now, will merge/release.

@Evertras Evertras merged commit 73ae5c3 into Evertras:main May 21, 2022
@alswl alswl deleted the feat/enable-api-controlled-filter branch February 13, 2023 07:38
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.

2 participants