organizationSearch.ts 366 Bytes
export const createOrganizationSearch = () => {
  return {
    showSearch: true,
    filterTreeNode: (value, options) => {
      const { props } = options || {};

      if (!value) {
        return true;
      }
      let { name } = props || {};
      value = value?.toLowerCase();
      name = name?.toLowerCase();
      return name.includes(value);
    },
  };
};