code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function incrementingRunsFrom(list) { list = list.concat([Infinity]);// use Infinity to ensure any nontrivial (length >= 2) run ends before the end of the loop var runs = []; var start = null; var prev = null; for (var i = 0; i < list.length; i++) { var current = list...
Given a sorted array of integers, this finds all contiguous runs where each item is incremented by 1 from the next. For example: [0, 2, 3, 5] has one such run: [2, 3] [0, 2, 3, 4, 6, 8, 9, 11] has two such runs: [2, 3, 4], [8, 9] [0, 2, 4] has no runs. @param {integer[]} list Sorted array of integers @re...
incrementingRunsFrom
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function getBrowserWindowObject() { var theWindow = null; try { /* eslint-disable-next-line no-undef */ theWindow = window; } catch (e) { // deliberately do nothing // empty } return theWindow; }
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
getBrowserWindowObject
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function versionsIn(strings) { return strings.map(function (str) { var match = str.match(/^\d+\.\d+\.\d+$/); return match ? match[0] : null; }).filter(function (match) { return match !== null; }); }
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
versionsIn
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function versionInLinkedElement($, element) { var elem = $(element); var urlAttr = tagNameOf(element) === 'LINK' ? 'href' : 'src'; var pathSegments = parseUrl(elem.attr(urlAttr)).pathname.split('/'); var versions = versionsIn(pathSegments); if (!versions.length) { ret...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
versionInLinkedElement
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function jqueryPluginVersions(jQuery) { /* istanbul ignore next */ return PLUGINS.map(function (pluginName) { var plugin = jQuery.fn[pluginName]; if (!plugin) { return undefined; } var constructor = plugin.Constructor; if (!cons...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
jqueryPluginVersions
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function bootstrapScriptsIn($) { var longhands = $('script[src*="bootstrap.js"]').filter(function (i, script) { var url = $(script).attr('src'); var filename = filenameFromUrl(url); return filename === 'bootstrap.js'; }); var minifieds = $('script[src*="bootst...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
bootstrapScriptsIn
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function LintError(id, message, elements) { this.id = id; this.url = WIKI_URL + id; this.message = message; this.elements = elements || cheerio(''); }
@param {integer} id Unique string ID for this type of lint error. Of the form "E###" (e.g. "E123"). @param {string} message Human-readable string describing the error @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
LintError
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function LintWarning(id, message, elements) { this.id = id; this.url = WIKI_URL + id; this.message = message; this.elements = elements || cheerio(''); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
LintWarning
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function addLinter(id, linter) { if (allLinters[id]) { /* istanbul ignore next */ throw new Error('Linter already registered with ID: ' + id); } var Problem = null; if (id[0] === 'E') { Problem = LintError; } else if (id[0] === 'W') { ...
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
addLinter
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function linterWrapper($, reporter) { function specializedReporter(message, elements) { reporter(new Problem(id, message, elements)); } linter($, specializedReporter); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
linterWrapper
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function specializedReporter(message, elements) { reporter(new Problem(id, message, elements)); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
specializedReporter
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
reporter = function (lint) { var background = 'background: #' + (lint.id[0] === 'W' ? 'f0ad4e' : 'd9534f') + '; color: #ffffff;'; if (!seenLint) { if (alertOnFirstProblem) { /* eslint-disable-next-line no-alert, no-undef */ ...
Lints the HTML of the current document. If there are any lint warnings, one general notification message will be window.alert()-ed to the user. Each warning will be output individually using console.warn(). @param {string[]} disabledIds Array of string IDs of linters to disable @param {object} [alertOpts] Options objec...
reporter
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function parse(urlStr) { var anchor = document.createElement('a'); anchor.href = urlStr; var urlObj = {}; URL_PROPERTIES.forEach(function (property) { urlObj[property] = anchor[property]; }); return urlObj; }
@param {string} urlStr URL to parse @returns {object} Object with fields representing the various parts of the parsed URL.
parse
javascript
twbs/bootlint
dist/browser/bootlint.js
https://github.com/twbs/bootlint/blob/master/dist/browser/bootlint.js
MIT
function sortedColumnClasses(classes) { // extract column classes var colClasses = []; while (true) { var match = COL_REGEX.exec(classes); if (!match) { break; } var colClass = match[0]; colClasses.push(colClass); ...
Moves any grid column classes to the end of the class string and sorts the grid classes by ascending screen size. @param {string} classes The "class" attribute of a DOM node @returns {string} The processed "class" attribute value
sortedColumnClasses
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function width2screensFor(classes) { var width = null; var width2screens = {}; while (true) { var match = COL_REGEX_G.exec(classes); if (!match) { break; } var screen = match[1]; width = match[2]; var screens...
@param {string} classes The "class" attribute of a DOM node @returns {Object.<string, integer[]>} Object mapping grid column widths (1 thru 12) to sorted arrays of screen size numbers (see SCREEN2NUM) Widths not used in the classes will not have an entry in the object.
width2screensFor
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function incrementingRunsFrom(list) { list = list.concat([Infinity]);// use Infinity to ensure any nontrivial (length >= 2) run ends before the end of the loop var runs = []; var start = null; var prev = null; for (var i = 0; i < list.length; i++) { var current = list...
Given a sorted array of integers, this finds all contiguous runs where each item is incremented by 1 from the next. For example: [0, 2, 3, 5] has one such run: [2, 3] [0, 2, 3, 4, 6, 8, 9, 11] has two such runs: [2, 3, 4], [8, 9] [0, 2, 4] has no runs. @param {integer[]} list Sorted array of integers @re...
incrementingRunsFrom
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function getBrowserWindowObject() { var theWindow = null; try { /* eslint-disable-next-line no-undef */ theWindow = window; } catch (e) { // deliberately do nothing // empty } return theWindow; }
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
getBrowserWindowObject
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function versionsIn(strings) { return strings.map(function (str) { var match = str.match(/^\d+\.\d+\.\d+$/); return match ? match[0] : null; }).filter(function (match) { return match !== null; }); }
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
versionsIn
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function versionInLinkedElement($, element) { var elem = $(element); var urlAttr = tagNameOf(element) === 'LINK' ? 'href' : 'src'; var pathSegments = parseUrl(elem.attr(urlAttr)).pathname.split('/'); var versions = versionsIn(pathSegments); if (!versions.length) { ret...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
versionInLinkedElement
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function jqueryPluginVersions(jQuery) { /* istanbul ignore next */ return PLUGINS.map(function (pluginName) { var plugin = jQuery.fn[pluginName]; if (!plugin) { return undefined; } var constructor = plugin.Constructor; if (!cons...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
jqueryPluginVersions
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function bootstrapScriptsIn($) { var longhands = $('script[src*="bootstrap.js"]').filter(function (i, script) { var url = $(script).attr('src'); var filename = filenameFromUrl(url); return filename === 'bootstrap.js'; }); var minifieds = $('script[src*="bootst...
@returns {(Window|null)} The browser window object, or null if this is not running in a browser environment
bootstrapScriptsIn
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function LintError(id, message, elements) { this.id = id; this.url = WIKI_URL + id; this.message = message; this.elements = elements || cheerio(''); }
@param {integer} id Unique string ID for this type of lint error. Of the form "E###" (e.g. "E123"). @param {string} message Human-readable string describing the error @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
LintError
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function LintWarning(id, message, elements) { this.id = id; this.url = WIKI_URL + id; this.message = message; this.elements = elements || cheerio(''); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
LintWarning
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function addLinter(id, linter) { if (allLinters[id]) { /* istanbul ignore next */ throw new Error('Linter already registered with ID: ' + id); } var Problem = null; if (id[0] === 'E') { Problem = LintError; } else if (id[0] === 'W') { ...
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
addLinter
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function linterWrapper($, reporter) { function specializedReporter(message, elements) { reporter(new Problem(id, message, elements)); } linter($, specializedReporter); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
linterWrapper
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function specializedReporter(message, elements) { reporter(new Problem(id, message, elements)); }
@param {integer} id Unique string ID for this type of lint warning. Of the form "W###" (e.g. "W123"). @param {string} message Human-readable string describing the warning @param {jQuery} elements jQuery or Cheerio collection of referenced DOM elements pointing to all problem locations in the document @class
specializedReporter
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
reporter = function (lint) { var background = 'background: #' + (lint.id[0] === 'W' ? 'f0ad4e' : 'd9534f') + '; color: #ffffff;'; if (!seenLint) { if (alertOnFirstProblem) { /* eslint-disable-next-line no-alert, no-undef */ ...
Lints the HTML of the current document. If there are any lint warnings, one general notification message will be window.alert()-ed to the user. Each warning will be output individually using console.warn(). @param {string[]} disabledIds Array of string IDs of linters to disable @param {object} [alertOpts] Options objec...
reporter
javascript
twbs/bootlint
src/bootlint.js
https://github.com/twbs/bootlint/blob/master/src/bootlint.js
MIT
function Location(line, column) { this.line = line; this.column = column; }
Represents a location within a source code file. @param {integer} line A 0-based line index @param {integer} column A 0-based column index @class
Location
javascript
twbs/bootlint
src/location.js
https://github.com/twbs/bootlint/blob/master/src/location.js
MIT
function LocationIndex(string) { // ensure newline termination if (string[string.length - 1] !== '\n') { string += '\n'; } this._stringLength = string.length; /* * Each triple in _lineStartEndTriples consists of: * [0], the 0-based line index of the ...
Maps code unit indices into the string to line numbers and column numbers. @param {string} string String to construct the index for @class
LocationIndex
javascript
twbs/bootlint
src/location.js
https://github.com/twbs/bootlint/blob/master/src/location.js
MIT
function parse(urlStr) { var anchor = document.createElement('a'); anchor.href = urlStr; var urlObj = {}; URL_PROPERTIES.forEach(function (property) { urlObj[property] = anchor[property]; }); return urlObj; }
@param {string} urlStr URL to parse @returns {object} Object with fields representing the various parts of the parsed URL.
parse
javascript
twbs/bootlint
src/url.js
https://github.com/twbs/bootlint/blob/master/src/url.js
MIT
invalid = function invalid() { _this8.setState(function () { return { data: _this8.store.get(), reset: false }; }); return; }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
invalid
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
beforeSaveCellCB = function beforeSaveCellCB(result) { _this8.body.cancelEditCell(); if (result || result === undefined) { _this8.editCell(newVal, rowIndex, colIndex); } else { invalid(); } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
beforeSaveCellCB
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
afterHandleAddRow = function afterHandleAddRow(errMsg) { if (isAsync) { _this9.toolbar.afterHandleSaveBtnClick(errMsg); } else { return errMsg; } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterHandleAddRow
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
afterAddRowCB = function afterAddRowCB(errMsg) { if (typeof errMsg !== 'undefined' && errMsg !== '') return afterHandleAddRow(errMsg); if (_this9.allowRemote(_Const2.default.REMOTE_INSERT_ROW)) { if (_this9.props.options.afterInsertRow) { _this9.props.options.afterInsertRow(new...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterAddRowCB
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } }
Returns the iterator method function contained on the iterable object. Be sure to invoke the function with the iterable as context: var iteratorFn = getIteratorFn(myIterable); if (iteratorFn) { var iterator = iteratorFn.call(myIterable); ... } @param {?object} maybeIterable @return {?function...
getIteratorFn
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function PropTypeError(message) { this.message = message; this.stack = ''; }
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
PropTypeError
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = compon...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createChainableTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
checkType
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createPrimitiveTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can o...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunction.thatReturnsNull); }
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createAnyTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside a...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createArrayOfTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propN...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFul...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createElementTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '`...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createInstanceTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } function validate(props, pro...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createEnumTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValu...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createObjectOfTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[prop...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } for (var i = ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createUnionTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } r...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createNodeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; }
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFu...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createShapeTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('suppli...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + ...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
createStrictShapeTypeChecker
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('suppli...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
validate
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); }...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
isNode
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols whic...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
isSymbol
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
getPropType
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceo...
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
getPreciseType
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
getPostfixForTypeWarning
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
We use an Error-like object for backward compatibility as people may call PropTypes directly and inspect their output. However, we don't use real Errors anymore. We don't inspect their stack anyway, and creating them is prohibitively expensive if they are created too often, such as what happens in oneOfType() for any t...
getClassName
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); ...
Use invariant() to assert state which your program assumes to be true. Provide sprintf-style format (only %s is supported) and arguments to provide information about what broke and what you were expecting. The invariant message will be stripped in production, but the invariant will remain to ensure logic does not dif...
invariant
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[ar...
Similar to invariant but only logs a warning if the condition is not met. This can be used to log issues in development environments in critical paths. Removing the logging code for production environments will keep the same logic and follow the same code paths.
printWarning
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (typeSpecs.hasOwnProperty(typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want t...
Assert that the values match with the type specs. Error messages are memorized and will only be shown once. @param {object} typeSpecs Map of name to a ReactPropType @param {object} values Runtime values that need to be type-checked @param {string} location e.g. "prop", "context", "child context" @param {string} compon...
checkPropTypes
javascript
AllenFang/react-bootstrap-table
dist/react-bootstrap-table.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/dist/react-bootstrap-table.js
MIT
isRemoteDataSource(props) { const { remote } = (props || this.props); return remote === true || Util.isFunction(remote); }
Returns true if in the current configuration, the datagrid should load its data remotely. @param {Object} [props] Optional. If not given, this.props will be used @return {Boolean}
isRemoteDataSource
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
allowRemote(action, props) { const { remote } = (props || this.props); if (typeof remote === 'function') { const remoteObj = remote(Const.REMOTE); return remoteObj[action]; } else { return remote; } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
allowRemote
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
render() { const style = { height: this.props.height, maxHeight: this.props.maxHeight }; const columns = this.getColumnsDescription(this.props); const sortList = this.store.getSortInfo(); const pagination = this.renderPagination(); const toolBar = this.renderToolBar(); const tab...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
render
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
isSelectAll() { if (this.store.isEmpty()) return false; const { selectRow: { unselectable, onlyUnselectVisible } } = this.props; const keyField = this.store.getKeyField(); const allRowKeys = onlyUnselectVisible ? this.store.get().map(r => r[keyField]) : this.store.getAllRowkey(); let def...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
isSelectAll
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
cleanSelected() { this.store.setSelectedRowKey([]); this.setState(() => { return { selectedRowKeys: [], reset: false }; }); }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
cleanSelected
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
cleanSort() { this.store.cleanSortInfo(); this.setState(() => { return { reset: false }; }); }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
cleanSort
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
toggleExpandAllChilds() { const { expanding } = this.state; if (expanding.length > 0) { this.setState(() => { return { expanding: [], reset: false }; }); } else { this.setState(() => { return { expanding: this.store.getAllRowkey(), ...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
toggleExpandAllChilds
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
invalid = () => { this.setState(() => { return { data: this.store.get(), reset: false }; }); return; }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
invalid
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
invalid = () => { this.setState(() => { return { data: this.store.get(), reset: false }; }); return; }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
invalid
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
beforeSaveCellCB = result => { this.body.cancelEditCell(); if (result || result === undefined) { this.editCell(newVal, rowIndex, colIndex); } else { invalid(); } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
beforeSaveCellCB
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
beforeSaveCellCB = result => { this.body.cancelEditCell(); if (result || result === undefined) { this.editCell(newVal, rowIndex, colIndex); } else { invalid(); } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
beforeSaveCellCB
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
editCell(newVal, rowIndex, colIndex) { const { onCellEdit } = this.props.options; const { afterSaveCell } = this.props.cellEdit; const columns = this.getColumnsDescription(this.props); const fieldName = columns[colIndex].name; const props = { rowIndex, colIndex }; if (onCellEdit) { newVal ...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
editCell
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
handleAddRowAtBegin(newObj) { try { this.store.addAtBegin(newObj); } catch (e) { return e; } this._handleAfterAddingRow(newObj, true); }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
handleAddRowAtBegin
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
afterHandleAddRow = errMsg => { if (isAsync) { this.toolbar.afterHandleSaveBtnClick(errMsg); } else { return errMsg; } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterHandleAddRow
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
afterHandleAddRow = errMsg => { if (isAsync) { this.toolbar.afterHandleSaveBtnClick(errMsg); } else { return errMsg; } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterHandleAddRow
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
afterAddRowCB = errMsg => { if (typeof errMsg !== 'undefined' && errMsg !== '') return afterHandleAddRow(errMsg); if (this.allowRemote(Const.REMOTE_INSERT_ROW)) { if (this.props.options.afterInsertRow) { this.props.options.afterInsertRow(newObj); } return afterHandleAddRow(...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterAddRowCB
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
afterAddRowCB = errMsg => { if (typeof errMsg !== 'undefined' && errMsg !== '') return afterHandleAddRow(errMsg); if (this.allowRemote(Const.REMOTE_INSERT_ROW)) { if (this.props.options.afterInsertRow) { this.props.options.afterInsertRow(newObj); } return afterHandleAddRow(...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
afterAddRowCB
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
getSizePerPage() { return this.state.sizePerPage; }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
getSizePerPage
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
getCurrentPage() { return this.state.currPage; }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
getCurrentPage
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
getTableDataIgnorePaging() { return this.store.getCurrentDisplayData(); }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
getTableDataIgnorePaging
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
deleteRow(dropRowKeys) { const dropRow = this.store.getRowByKey(dropRowKeys); const { onDeleteRow, afterDeleteRow, pageStartIndex } = this.props.options; if (onDeleteRow) { onDeleteRow(dropRowKeys, dropRow); } this.store.setSelectedRowKey([]); // clear selected row key if (this.allowRe...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
deleteRow
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
renderPagination() { if (this.props.pagination) { let dataSize; if (this.allowRemote(Const.REMOTE_PAGE)) { dataSize = this.props.fetchInfo.dataTotalSize; } else { dataSize = this.store.getDataNum(); } const { options } = this.props; const withFirstAndLast = option...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
renderPagination
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
renderToolBar() { const { exportCSV, selectRow, insertRow, deleteRow, search, children, keyField } = this.props; const enableShowOnlySelected = selectRow && selectRow.showOnlySelected; const print = typeof this.props.options.printToolBar === 'undefined' ? true : this.props.options.printToolBar; if...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
renderToolBar
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
renderTableFilter(columns) { if (this.props.columnFilter) { return ( <TableFilter columns={ columns } rowSelectType={ this.props.selectRow.mode } onFilter={ this.handleFilterData }/> ); } else { return null; } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
renderTableFilter
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
renderTableFooter(footerData, footerFormatterReturnData, columns, colGroups) { if (this.props.footer) { let hideSelectColumn = true; const { mode } = this.props.selectRow; const isSelectRowDefined = Util.isSelectRowDefined(mode); if (isSelectRowDefined) { hideSelectColumn = this.prop...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
renderTableFooter
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
_adjustTable() { this._adjustHeight(); if (!this.props.printable) { this._adjustHeaderWidth(); } }
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
_adjustTable
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
_adjustHeaderWidth() { const header = this.header.getHeaderColGrouop(); const tbody = this.body.tbody; const bodyHeader = this.body.getHeaderColGrouop(); const firstRow = tbody.childNodes[0]; const isScroll = tbody.parentNode.getBoundingClientRect().height > tbody.parentNode.parentNode.getBoun...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
_adjustHeaderWidth
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
_adjustHeight() { const { height } = this.props; let { maxHeight } = this.props; if ((typeof height === 'number' && !isNaN(height)) || height.indexOf('%') === -1) { this.body.container.style.height = parseFloat(height, 10) - this.header.container.offsetHeight + 'px'; } if (maxHeight) {...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
_adjustHeight
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
_handleAfterAddingRow(newObj, atTheBeginning) { let result; if (this.props.pagination) { // if pagination is enabled and inserting row at the end, // change page to the last page // otherwise, change it to the first page const { sizePerPage } = this.state; if (atTheBeginning) { ...
Returns true if this action can be handled remote store From #990, Sometimes, we need some actions as remote, some actions are handled by default so function will tell you the target action is can be handled as remote or not. @param {String} [action] Required. @param {Object} [props] Optional. If not given, this.pr...
_handleAfterAddingRow
javascript
AllenFang/react-bootstrap-table
src/BootstrapTable.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js
MIT
render() { this.clickNum = 0; const { selectRow, row, isSelected, className, index, hidden } = this.props; let { style } = this.props; let backgroundColor = null; let selectRowClass = null; if (selectRow) { backgroundColor = Utils.isFunction(selectRow.bgColor) ? selectRow.bgColor(...
if clickToSelectAndEditCell is enabled, there should be a delay to prevent a selection changed when user dblick to edit cell on same row but different cell
render
javascript
AllenFang/react-bootstrap-table
src/TableRow.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/TableRow.js
MIT
filterArray(targetVal, filterVal) { // case insensitive return filterVal.indexOf(targetVal) > -1; }
Filter if targetVal is contained in filterVal.
filterArray
javascript
AllenFang/react-bootstrap-table
src/store/TableDataStore.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/store/TableDataStore.js
MIT
search(searchText) { if (searchText.trim() === '') { this.filteredData = null; this.isOnFilter = false; this.searchText = null; if (this.filterObj) this._filter(this.data); } else { let source = this.data; this.searchText = searchText; if (this.filterObj) { this...
Filter if targetVal is contained in filterVal.
search
javascript
AllenFang/react-bootstrap-table
src/store/TableDataStore.js
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/store/TableDataStore.js
MIT