Added selection / keyboard navigation
Summary: per title Reviewed By: nikoant Differential Revision: D26368673 fbshipit-source-id: 7a458e28af1229ee8193dfe2a6d156afd9282acd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb7c09c972
commit
1ce665ceaf
@@ -69,9 +69,14 @@ type StateOptions = {
|
||||
|
||||
export function createState<T>(
|
||||
initialValue: T,
|
||||
options?: StateOptions,
|
||||
): Atom<T>;
|
||||
export function createState<T>(): Atom<T | undefined>;
|
||||
export function createState(
|
||||
initialValue: any = undefined,
|
||||
options: StateOptions = {},
|
||||
): Atom<T> {
|
||||
const atom = new AtomValue<T>(initialValue);
|
||||
): Atom<any> {
|
||||
const atom = new AtomValue(initialValue);
|
||||
if (getCurrentPluginInstance() && options.persist) {
|
||||
const {rootStates} = getCurrentPluginInstance()!;
|
||||
if (rootStates[options.persist]) {
|
||||
|
||||
Reference in New Issue
Block a user