filterOption()

in src/setter/expression-setter/index.tsx [226:234]


  filterOption(inputValue: string, item: { value: string | any[] }) {
    const cursorIndex = this.getInputCursorPosition();
    if (typeof(inputValue)!='string') return false;
    const preStr = inputValue.substr(0, cursorIndex);
    const lastKey: string[] = preStr.split('.').slice(-1);
    if (!lastKey) return true;
    if (item.value.indexOf(lastKey) > -1) return true;
    return false;
  }