Skip to content

Instantly share code, notes, and snippets.

@dkotov
dkotov / index.html
Last active December 15, 2015 09:19
Twitter Bootstrap Typeahead wrapper that uses objects instead of strings (lite version) -- see example http://jsfiddle.net/VjVMf/.
<input type="text" data-bind="value: customerAC.query, jqueryui: { widget: 'typeahead', options: { source: customerAC.source } }" placeholder="Start typing customer name..." />
<br />
<strong data-bind="text: selectedCustomerId"></strong>
import { useMutation, queryCache } from 'react-query';
import { useLocation, useHistory } from 'react-router-dom';
import { UserStatus, api, showSuccessMessage } from 'package';
const SuccessMessageByStatus = {
[UserStatus.BLOCKED]: 'User blocked',
[UserStatus.PROMOTED]: 'User promoted',
[UserStatus.ACTIVE]: 'User activated',
};