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

typeahead combobox tertiaryAction #64

Open
helllth opened this issue Nov 8, 2023 · 2 comments
Open

typeahead combobox tertiaryAction #64

helllth opened this issue Nov 8, 2023 · 2 comments

Comments

@helllth
Copy link
Member

helllth commented Nov 8, 2023

Screenshot 2023-11-08 at 13 40 19

The tertiary action should kick in when the clear button on the left is disabled anyway.

We can use it to switch to another gazetteer control for example. (Or for activating the often mentioned speech recognition 😉 )

@helllth
Copy link
Member Author

helllth commented Nov 8, 2023

Configuration with these props:

  1. in TopicMapComponent
 <TopicMapComponent
        maxZoom={22}
        gazData={gazData}
        gazetteerSearchControlProps={{
          tertiaryAction: () => {
            console.log("Tertiary Action");
            window.alert("Tertiary Action");
          },
          tertiaryActionIcon: faComment,
          tertiaryActionTooltip: "Tertiary Action Tooltip",
          teriaryActionDisabled: undefined, //defaultValue is false, therefore typically not needed
        }}
    ></TopicMapComponent>
  1. or directly in GazetteerSearchControl (or GazeteerSearchComponent with
          tertiaryAction= { () => {
            console.log("Tertiary Action");
            window.alert("Tertiary Action");
          }}
          tertiaryActionIcon= {faComment}
          tertiaryActionTooltip= "Tertiary Action Tooltip"
          teriaryActionDisabled: {undefined} //defaultValue is false, therefore typically not needed

@helllth
Copy link
Member Author

helllth commented Nov 8, 2023

Looks like this:

Screen Recording 2023-11-08 at 14 28 07

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

No branches or pull requests

1 participant