lodash APIs
- cloneDeep
- get
- isEqual
- isEmpty
- debounce
- merge
- uniq
- omit
- isString
- isArray
- pick
- sortBy
- groupBy
- flatten
- set
- find
- orderBy
- mapValues
- isObject
- last
- isNil
- isNumber
- range
- chunk
- throttle
- filter
- uniqBy
- difference
- pickBy
- noop
- capitalize
- uniqueId
- has
- isUndefined
- map
- camelCase
- isFunction
- kebabCase
- intersection
- random
- includes
- isPlainObject
- compact
- Dictionary
- findIndex
- keyBy
- forEach
- trim
- clamp
- identity
- remove
- keys
- isNull
- times
- startCase
- first
- values
- mapKeys
- sumBy
- max
- reduce
- some
- zip
- every
- memoize
- clone
- countBy
- concat
- snakeCase
- assign
- isBoolean
- uniqWith
- omitBy
- without
- minBy
- head
- maxBy
- min
- upperFirst
- escapeRegExp
- reverse
- sample
- shuffle
- defaults
- inRange
- flattenDeep
- take
- union
- sum
- mergeWith
- castArray
- replace
- flatMap
- reject
- zipObject
- template
- isNaN
- mean
- size
- findLast
- unset
- partition
- round
- fromPairs
- floor
- toPairs
- indexOf
- toString
- sampleSize
- differenceBy
- update
- chain
- startsWith
- xor
- pull
- DebouncedFunc
- defaultsDeep
- split
- findKey
- unescape
- partial
- toNumber
- invert
- each
- differenceWith
- endsWith
- slice
- isDate
- unionBy
- findLastIndex
- join
- isInteger
- delay
- isObjectLike
- padStart
- result
- isError
- extend
- cloneDeepWith
- upperCase
- trimStart
- constant
- matches
- lowerCase
- forIn
- lowerFirst
- once
- transform
- isMatch
- escape
- isEqualWith
- zipWith
- isRegExp
- entries
- sortedIndexBy
- dropWhile
- takeWhile
- isElement
- forEachRight
- ReplaceFunction
- TemplateExecutor
- keysIn
- IsEqualCustomizer
- isTypedArray
- cond
- stubTrue
- toUpper
- isMap
- isSet
- meanBy
- rangeRight
- repeat
- trimEnd
- now
- nth
- pullAt
- toPath
- eq
- lt
- lte
- gt
- gte
- pullAllBy
- pullAll
- toLower
- fill
- ceil
- flatMapDeep
- CloneDeepWithCustomizer
- negate
- takeRightWhile
- invoke
- tap
- intersectionWith
- truncate
- Collection
- bind
- curry
- partialRight
- sortedUniq
- sortedIndexOf
- Object
- drop
- _
Other Related APIs
- lodash#isEmpty
- lodash#cloneDeep
- lodash#get
- lodash#set
- lodash#isArray
- lodash#filter
- lodash#find
- lodash#uniqBy
- lodash#uniq
- lodash#pull
- lodash#merge
- lodash#flatten
- lodash#forEach
- lodash#map
- lodash#isNil
- lodash#orderBy
- lodash#every
- lodash#pullAll
- antd/lib/table#TableProps
- antd/lib/table#ColumnProps
- antd/lib/table#TablePaginationConfig
lodash#pullAllBy TypeScript Examples
The following examples show how to use
lodash#pullAllBy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 5 votes |
// istanbul ignore next
private _handleRowSelectChange = (
selectedRowKeys: string[],
selectedRows: any[]
): void => {
const rowKey =
this.rowKey ?? this._fields.rowKey ?? this.configProps?.rowKey;
this._selectedRows = selectedRows;
if (this._selected) {
const _selectedRows = [...selectedRows, ...this._allChildren];
if (this.autoSelectParentWhenAllChildrenSelected && this._selectedRow) {
const selectedRowKeySet = new Set(selectedRowKeys);
const parent = this._findParentByChildKeyValue(
this._selectedRow[rowKey] as string,
rowKey,
this._dataSource
);
if (
parent &&
(parent[this.childrenColumnName] as Record<string, unknown>[]).every(
(item) => selectedRowKeySet.has(item[rowKey] as string)
)
) {
_selectedRows.push(parent);
}
}
this._selectedRows = uniqBy(_selectedRows, rowKey);
} else {
let parent: Record<string, unknown>;
if (this.autoSelectParentWhenAllChildrenSelected && this._selectedRow) {
parent = this._findParentByChildKeyValue(
this._selectedRow[rowKey] as string,
rowKey,
this._dataSource
);
}
this._selectedRows = pullAllBy(
selectedRows,
this._allChildren.concat(parent),
rowKey
);
}
this._selectedRow = undefined;
this.selectedRowKeys = map(this._selectedRows, rowKey);
let detail = null;
const data = isEmpty(this._selectUpdateEventDetailField)
? this._selectedRows
: map(this._selectedRows, (row) =>
get(row, this._selectUpdateEventDetailField)
);
detail =
isEmpty(this._selectUpdateEventDetailKeys) || isEmpty(data)
? data
: set({}, this._selectUpdateEventDetailKeys, data);
if (!isEmpty(detail)) {
detail = merge(detail, this._selectUpdateEventDetailExtra);
}
if (!this._selectUpdateEventName) {
this.selectUpdate.emit(detail);
} else {
const eventName = this._selectUpdateEventName
? this._selectUpdateEventName
: "select.update";
this.dispatchEvent(new CustomEvent(eventName, { detail }));
}
};