+
Filters
@@ -225,6 +321,14 @@ export const VendorDataMainContent = observer(
/>
)}
+ {(marketPlaceVendorDataState.providerDisplayState ===
+ VendorDataProviderType.TERMINAL_LICENSE ||
+ marketPlaceVendorDataState.providerDisplayState ===
+ VendorDataProviderType.ADD_ONS) && (
+
+ )}
>
)}
@@ -236,11 +340,27 @@ export const LegendMarketplaceVendorData = withLegendMarketplaceVendorDataStore(
observer(() => {
const marketPlaceVendorDataStore = useLegendMarketPlaceVendorDataStore();
- const onChange = (query: string | undefined) => {
- marketPlaceVendorDataStore.setProvidersFilters([
- { label: 'query', value: query },
- ] as Filter[]);
- };
+ const handleSearch = useCallback(
+ (query: string | undefined) => {
+ marketPlaceVendorDataStore.setSearchTerm(query ?? '');
+ flowResult(marketPlaceVendorDataStore.populateProviders()).catch(
+ marketPlaceVendorDataStore.applicationStore.alertUnhandledError,
+ );
+ },
+ [marketPlaceVendorDataStore],
+ );
+
+ const handleSearchChange = useCallback(
+ (query: string) => {
+ if (query === '') {
+ marketPlaceVendorDataStore.setSearchTerm('');
+ flowResult(marketPlaceVendorDataStore.populateProviders()).catch(
+ marketPlaceVendorDataStore.applicationStore.alertUnhandledError,
+ );
+ }
+ },
+ [marketPlaceVendorDataStore],
+ );
useEffect(() => {
marketPlaceVendorDataStore.init();
@@ -250,7 +370,10 @@ export const LegendMarketplaceVendorData = withLegendMarketplaceVendorDataStore(